mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
fixed bug with open CodeMirror view from menu
This commit is contained in:
parent
0176f04af5
commit
7881ad2e4e
4 changed files with 24 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"cache" : {"allowed" : true},
|
||||
"cache" : {"allowed" : false},
|
||||
"minification" : {
|
||||
"js" : true,
|
||||
"js" : false,
|
||||
"css" : true,
|
||||
"html" : true,
|
||||
"img" : true
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
/* function shows CodeMirror editor */
|
||||
CloudCommander.Editor.CodeMirror.show = (function(pCurrentFile, pIsReadOnly){
|
||||
/* if CloudEditor is not loaded - loading him */
|
||||
if(!Util.getById('CloudEditor'))
|
||||
var lCloudEditor = Util.getById('CloudEditor');
|
||||
if(!lCloudEditor)
|
||||
return this.load(pCurrentFile, pIsReadOnly);
|
||||
|
||||
/* if CodeMirror function show already
|
||||
|
|
@ -104,9 +105,7 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
readOnly : lReadOnly
|
||||
});
|
||||
};
|
||||
|
||||
var lCloudEditor = Util.getById('CloudEditor');
|
||||
|
||||
|
||||
var lA;
|
||||
|
||||
/* getting link */
|
||||
|
|
|
|||
|
|
@ -51,8 +51,11 @@ var CloudCommander, $;
|
|||
CloudCommander.Editor();
|
||||
else{
|
||||
var lEditor = CloudCommander.Editor.get();
|
||||
if(lEditor && lEditor.show)
|
||||
lEditor.show();
|
||||
if(lEditor && lEditor.show){
|
||||
var lCurrent = Util.getCurrentFile();
|
||||
if(lCurrent)
|
||||
lEditor.show();
|
||||
}
|
||||
}
|
||||
|
||||
}},
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ exports.Cache = {
|
|||
*/
|
||||
exports.Minify = {
|
||||
/* pathes to directories */
|
||||
INDEX :'index.html',
|
||||
INDEX :'index.html',
|
||||
/* приватный переключатель минимизации */
|
||||
_allowed :{
|
||||
css:true,
|
||||
|
|
@ -106,7 +106,18 @@ exports.Minify = {
|
|||
'without minify module\n' +
|
||||
'npm i minify');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* temporary changed dir path,
|
||||
* becouse directory lib is write
|
||||
* protected by others by default
|
||||
* so if node process is started
|
||||
* from other user (root for example
|
||||
* in nodester) we can not write
|
||||
* minified versions
|
||||
*/
|
||||
this.MinFolder = '/' + lMinify.MinFolder;
|
||||
|
||||
var lOptimizeParams = [];
|
||||
if (this._allowed.js) {
|
||||
lOptimizeParams.push('client.js');
|
||||
|
|
@ -157,5 +168,6 @@ exports.Minify = {
|
|||
},
|
||||
|
||||
/* minification folder name */
|
||||
MinFolder : '',
|
||||
Cache : {}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue