diff --git a/client.js b/client.js index b3063e61..5ac0c9a1 100644 --- a/client.js +++ b/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. diff --git a/lib/client/editor.js b/lib/client/editor.js index 9971685d..3cae9137 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -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); };