From d1f287f397973f75bd2f2ffe0b4b0191cbef2864 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 3 Aug 2012 16:15:34 +0300 Subject: [PATCH] Update lib/client/editor.js --- lib/client/editor.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/client/editor.js b/lib/client/editor.js index e4e9bb8c..a7e2f97b 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -135,9 +135,14 @@ CloudCommander.Editor.CodeMirror.show = (function(){ lLoadingImage.className = 'icon loading';/* показываем загрузку*/ lErrorImage.className = 'icon error hidden';/* прячем ошибку */ - /* show loading icon */ - lCurrent.firstChild.nextSibling.appendChild(lLoadingImage); + + /* show loading icon * + * if it not showed */ + var lCurrent = lCurrent.firstChild.nextSibling; + if(lCurrent !== lLoadingImage.parentElement) + appendChild(lLoadingImage); + this.loading = true; var lParent = this; /* reading data from current file */ @@ -200,7 +205,7 @@ CloudCommander.Editor.CodeMirror.hide = (function(pParent) { CloudCommander.Editor.Keys = (function(){ "use strict"; - + /* loading js and css of CodeMirror */ this.CodeMirror.show(this.CodeMirror);