mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(github) load
This commit is contained in:
parent
32c014f94e
commit
b098bb888c
1 changed files with 14 additions and 17 deletions
|
|
@ -1,5 +1,4 @@
|
|||
var CloudCmd, Util, DOM, $, Github, cb;
|
||||
/* module for work with github */
|
||||
var CloudCmd, Util, DOM, Github, cb;
|
||||
|
||||
(function(CloudCmd, Util, DOM) {
|
||||
'use strict';
|
||||
|
|
@ -31,25 +30,23 @@ var CloudCmd, Util, DOM, $, Github, cb;
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function loads github.js
|
||||
*/
|
||||
function load(pCallBack) {
|
||||
console.time('github load');
|
||||
function load(callback) {
|
||||
var dir = CloudCmd.LIBDIRCLIENT + 'storage/github/',
|
||||
files = [
|
||||
dir + 'lib/underscore.js',
|
||||
dir + 'lib/base64.js',
|
||||
dir + 'github.js'
|
||||
|
||||
],
|
||||
url = CloudFunc.getJoinURL(files);
|
||||
|
||||
var lDir = '/lib/client/storage/github/',
|
||||
lFiles = [
|
||||
lDir + 'github.js',
|
||||
lDir + 'lib/base64.js',
|
||||
lDir + 'lib/underscore.js'
|
||||
];
|
||||
Util.time('github');
|
||||
|
||||
DOM.anyLoadInParallel(lFiles, function() {
|
||||
console.timeEnd('github load');
|
||||
DOM.jsload(url, function() {
|
||||
Util.timeEnd('github');
|
||||
DOM.Images.hideLoad();
|
||||
|
||||
Util.exec(pCallBack);
|
||||
Util.exec(callback);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue