mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
added codeMirror dir constant
This commit is contained in:
parent
b54fffdfcc
commit
6e4016fd1f
1 changed files with 10 additions and 8 deletions
|
|
@ -12,9 +12,12 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
get : (function(){
|
||||
return this.CodeMirror;
|
||||
})
|
||||
};
|
||||
};
|
||||
var CloudMirror = {};
|
||||
|
||||
cloudcmd.Editor.dir = 'lib/client/editor/';
|
||||
CloudMirror.dir = cloudcmd.Editor.dir + 'codemirror/';
|
||||
|
||||
/* indicator says CodeMirror still loads */
|
||||
CloudMirror.loading = false;
|
||||
|
||||
|
|
@ -42,8 +45,8 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
*/
|
||||
var loadAll = function() {
|
||||
Util.cssLoad([
|
||||
{ src : 'lib/client/editor/codemirror/codemirror.css'},
|
||||
{ src : 'lib/client/editor/codemirror/theme/night.css'}
|
||||
{ src : CloudMirror.dir + 'codemirror.css'},
|
||||
{ src : CloudMirror.dir + 'theme/night.css'}
|
||||
]);
|
||||
|
||||
|
||||
|
|
@ -58,14 +61,13 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
'}'
|
||||
});
|
||||
|
||||
Util.jsload('lib/client/editor/' +
|
||||
'codemirror/mode/javascript.js',
|
||||
createEditorDiv);
|
||||
Util.jsload(CloudMirror.dir +
|
||||
'mode/javascript.js', createEditorDiv);
|
||||
};
|
||||
|
||||
/* load CodeMirror main module */
|
||||
Util.jsload('lib/client/editor/' +
|
||||
'codemirror/codemirror.js', loadAll);
|
||||
Util.jsload(CloudMirror.dir +
|
||||
'codemirror.js', loadAll);
|
||||
});
|
||||
|
||||
/* function shows CodeMirror editor */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue