diff --git a/lib/client/editor.js b/lib/client/editor.js index 69e5f618..281c6993 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -75,7 +75,13 @@ CloudCommander.Editor.CodeMirror.show = (function(){ if(this.loading) return; - var lParent = this; + /* when folder view + * is no need to edit + * data + */ + var lReadOnly = false; + + var lParent = this; var initCodeMirror_f = function(pValue){ CodeMirror(lCloudEditor,{ mode : 'javascript', @@ -84,11 +90,12 @@ CloudCommander.Editor.CodeMirror.show = (function(){ lineNumbers : true, //переносим длинные строки lineWrapping: false, - autofocus : true, + autofocus : true, extraKeys: { //Сохранение "Esc": lParent.hide(lParent) - } + }, + readOnly : lReadOnly }); }; @@ -123,8 +130,10 @@ CloudCommander.Editor.CodeMirror.show = (function(){ */ if (lSize === '