mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
setted readOnly mode, when directory opened in CodeMirror
This commit is contained in:
parent
18841e7fd0
commit
035f6d2dfd
1 changed files with 14 additions and 5 deletions
|
|
@ -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 === '<dir>'){
|
||||
if (lA.indexOf(CloudFunc.NOJS) ===
|
||||
CloudFunc.FS.length){
|
||||
lA = lA.replace(CloudFunc.NOJS, '');
|
||||
CloudFunc.FS.length) {
|
||||
|
||||
lA = lA.replace(CloudFunc.NOJS, '');
|
||||
lReadOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue