mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
refactor(client) init
This commit is contained in:
parent
933f90e271
commit
86eac9dc83
1 changed files with 17 additions and 17 deletions
|
|
@ -136,25 +136,25 @@ var Util, DOM, CloudFunc;
|
|||
* инициализации
|
||||
*/
|
||||
this.init = function() {
|
||||
var lCallBack, lFunc;
|
||||
|
||||
lCallBack = function() {
|
||||
Util.loadOnLoad([
|
||||
initModules,
|
||||
baseInit,
|
||||
Util.bind(CloudCmd.route, location.hash)
|
||||
]);
|
||||
},
|
||||
lFunc = function(pCallBack) {
|
||||
CloudCmd.OLD_BROWSER = true;
|
||||
var lSrc = CloudCmd.LIBDIRCLIENT + 'polyfill.js';
|
||||
var callback = function() {
|
||||
Util.loadOnLoad([
|
||||
initModules,
|
||||
baseInit,
|
||||
Util.bind(CloudCmd.route, location.hash)
|
||||
]);
|
||||
},
|
||||
|
||||
DOM.jqueryLoad(
|
||||
DOM.retJSLoad(lSrc, pCallBack)
|
||||
);
|
||||
};
|
||||
func = function(callBack) {
|
||||
var src = CloudCmd.LIBDIRCLIENT + 'polyfill.js';
|
||||
|
||||
CloudCmd.OLD_BROWSER = true;
|
||||
|
||||
DOM.jqueryLoad(function() {
|
||||
DOM.jsload(src, callback);
|
||||
});
|
||||
};
|
||||
|
||||
Util.ifExec(document.body.scrollIntoViewIfNeeded, lCallBack, lFunc);
|
||||
Util.ifExec(document.body.scrollIntoViewIfNeeded, callback, func);
|
||||
};
|
||||
|
||||
this.route = function(path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue