diff --git a/lib/client/editor.js b/lib/client/editor.js index ae14b678..5440eb31 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -77,7 +77,7 @@ CloudCommander.Editor.CodeMirror = { autofocus : true, extraKeys: { //Сохранение - "Esc": lParent.hide(this) + "Esc": lParent.hide(lParent) } }); }; @@ -96,23 +96,20 @@ CloudCommander.Editor.CodeMirror = { lA = lA[0].href; /* reading data from current file */ - var lValue = $.ajax({ + $.ajax({ url:lA, error: function(jqXHR, textStatus, errorThrown){ - console.log(textStatus+' : '+errorThrown); - initCodeMirror_f(''); + console.log(textStatus+' : '+errorThrown); }, success:function(data, textStatus, jqXHR){ initCodeMirror_f(data); + + lLeft && + (lLeft.className = 'panel hidden'); } - }); - if(lValue.responseText) - lValue = lValue.responseText; - - lLeft && - (lLeft.className = 'panel hidden'); + }); }), hide : (function(pParent) { return function(){