mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(client) init
This commit is contained in:
parent
ca6d06805e
commit
e4e3844c2a
1 changed files with 4 additions and 7 deletions
|
|
@ -18,7 +18,6 @@ var Util, DOM, CloudFunc;
|
|||
this.LIBDIR = '/lib/';
|
||||
this.LIBDIRCLIENT = '/lib/client/';
|
||||
this.MIN_ONE_PANEL_WIDTH = 1155;
|
||||
this.OLD_BROWSER = false;
|
||||
this.HOST = location.origin ||
|
||||
location.protocol + '//' + location.host;
|
||||
/**
|
||||
|
|
@ -145,7 +144,7 @@ var Util, DOM, CloudFunc;
|
|||
* инициализации
|
||||
*/
|
||||
this.init = function() {
|
||||
var callback = function() {
|
||||
var func = function() {
|
||||
Util.exec.series([
|
||||
initModules,
|
||||
baseInit,
|
||||
|
|
@ -153,17 +152,15 @@ var Util, DOM, CloudFunc;
|
|||
]);
|
||||
},
|
||||
|
||||
func = function(callback) {
|
||||
var src = CloudCmd.LIBDIRCLIENT + 'polyfill.js';
|
||||
|
||||
CloudCmd.OLD_BROWSER = true;
|
||||
funcBefore = function(callback) {
|
||||
var src = CloudCmd.LIBDIRCLIENT + 'polyfill.js';
|
||||
|
||||
DOM.loadJquery(function() {
|
||||
DOM.load.js(src, callback);
|
||||
});
|
||||
};
|
||||
|
||||
Util.exec.if(document.body.scrollIntoViewIfNeeded, callback, func);
|
||||
Util.exec.if(document.body.scrollIntoViewIfNeeded, func, funcBefore);
|
||||
};
|
||||
|
||||
this.route = function(path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue