mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
minor changes
This commit is contained in:
parent
f16aa33dbe
commit
cf3af3f002
1 changed files with 14 additions and 12 deletions
|
|
@ -7,17 +7,19 @@ CloudCommander.Editor.CodeMirror = {
|
|||
load: (function(){ /* function loads CodeMirror js and css files */
|
||||
|
||||
/* function shows editor */
|
||||
var createEditorDiv = function() {
|
||||
if (!document.getElementById('CloudEditor')) {
|
||||
var lEditor=document.createElement('div');
|
||||
lEditor.id ='CloudEditor';
|
||||
var lFM = document.getElementById('fm');
|
||||
|
||||
if(lFM){
|
||||
lFM.appendChild(lEditor);
|
||||
this.show();
|
||||
}else console.log('Error. Something went wrong FM not found');
|
||||
}
|
||||
var createEditorDiv = function(pParent){
|
||||
return function(){
|
||||
if (!document.getElementById('CloudEditor')) {
|
||||
var lEditor=document.createElement('div');
|
||||
lEditor.id ='CloudEditor';
|
||||
var lFM = document.getElementById('fm');
|
||||
|
||||
if(lFM){
|
||||
lFM.appendChild(lEditor);
|
||||
this.show();
|
||||
}else console.log('Error. Something went wrong FM not found');
|
||||
}
|
||||
};
|
||||
};
|
||||
/* function loads css files
|
||||
* of CodeMirror
|
||||
|
|
@ -48,7 +50,7 @@ CloudCommander.Editor.CodeMirror = {
|
|||
});
|
||||
|
||||
CloudCommander.jsload('lib/client/editor/codemirror/pack/xml.pack.js',
|
||||
createEditorDiv);
|
||||
createEditorDiv(this));
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue