mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
added anyLoadByLoad function to Utils
This commit is contained in:
parent
0f100f8ea4
commit
335ba41f1d
2 changed files with 28 additions and 1 deletions
27
client.js
27
client.js
|
|
@ -132,6 +132,33 @@ CloudClient.Util = (function(){
|
|||
return lID.replace('.','_');
|
||||
},
|
||||
|
||||
|
||||
this.loadOnload = function(pFunc_a){
|
||||
if(Array.isArray(pFunc_a) && pFunc_a.length){
|
||||
var lFunc_f = pFunc_a.pop();
|
||||
|
||||
if(typeof lFunc_f === 'function')
|
||||
lFunc_f();
|
||||
|
||||
return this.loadOnload(pFunc_a);
|
||||
}
|
||||
else if(typeof pFunc_a === 'function')
|
||||
return pFunc_a();
|
||||
};
|
||||
|
||||
this.anyLoadOnload = function(pParams_a){
|
||||
if(Array.isArray(pParams_a) && pParams_a.length){
|
||||
var lParams_o = pParams_a.pop();
|
||||
|
||||
if(!lParams_o.func)
|
||||
lParams_o.func = function(){
|
||||
lThis.anyLoadOnload(pParams_a);
|
||||
};
|
||||
|
||||
return this.anyload(lParams_o);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Функция создаёт элемент и
|
||||
* загружает файл с src.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ CloudCommander.Editor.CodeMirror.load = (function(pParent){
|
|||
'}'
|
||||
});
|
||||
|
||||
pParent.jsload('lib/client/editor/' +
|
||||
pParent.jsload('lib/client/editor/' +
|
||||
'codemirror/pack/javascript.pack.js',
|
||||
createEditorDiv);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue