diff --git a/lib/client/editor.js b/lib/client/editor.js index 41a84efd..270474e2 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -58,8 +58,7 @@ CloudCommander.Editor.CodeMirror = { /* if CloudEditor is not loaded - loading him */ if(!document.getElementById('CloudEditor')) return this.load(this); - /* removing keyBinding if set */ - CloudCommander.keyBinded = false; + /* removing keyBinding if set */ var lParent = this; var initCodeMirror_f = function(pValue){ @@ -94,16 +93,15 @@ CloudCommander.Editor.CodeMirror = { /* reading data from current file */ $.ajax({ url:lA, - error: function(jqXHR, textStatus, errorThrown){ - console.log(textStatus+' : '+ errorThrown); - - return false; + console.log(textStatus+' : '+ errorThrown); }, success:function(data, textStatus, jqXHR){ initCodeMirror_f(data); + CloudCommander.keyBinded = false; + lLeft && (lLeft.className = 'panel hidden'); } diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 4a50dd64..43e39fe7 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -284,7 +284,7 @@ CloudCommander.keyBinding=(function(){ /* добавляем обработчик клавишь */ if(document.addEventListener) document.addEventListener('keydown', key_event,false); - else document.onkeypress=key_event; + else document.onkeypress = key_event; /* клавиши назначены*/ CloudCommander.keyBinded=true; }); \ No newline at end of file