minor changes

This commit is contained in:
coderaiser 2012-12-04 09:27:28 -05:00
parent 7e5de6d3cf
commit d30b4f7742
5 changed files with 21 additions and 17 deletions

View file

@ -33,7 +33,6 @@
/**
* additional processing of index file
*
*/
function indexProcessing(pData){
var lReplace_s,

View file

@ -333,7 +333,6 @@ CloudClient.init = function(){
};
function initModules(pCallBack){
loadModule({
/* привязываем клавиши к функциям */
path : 'keyBinding.js',
@ -346,7 +345,8 @@ function initModules(pCallBack){
DOM.ajax({
url:'/modules.json',
success: function(pModules){
var lShowLoadFunc = Util.retFunc( DOM.Images.showLoad ),
var lStorage = 'storage/',
lShowLoadFunc = Util.retFunc( DOM.Images.showLoad ),
lDisableMenuFunc = function(){
var lFunc = document.oncontextmenu;
document.oncontextmenu = function(){
@ -359,8 +359,11 @@ function initModules(pCallBack){
'editor/_codemirror' : lShowLoadFunc,
'menu' : lDisableMenuFunc,
'viewer' : lShowLoadFunc
};
},
lNames = {};
lNames[lStorage + '_dropbox'] = 'DropBox',
lNames[lStorage + '_github' ] = 'GitHub',
lDisableMenuFunc();
@ -369,8 +372,9 @@ function initModules(pCallBack){
var lModule = pModules[i];
loadModule({
path: lModule,
dobefore: lDoBefore[lModule]
path : lModule,
dobefore : lDoBefore[lModule],
name : lNames[lModule]
});
}

View file

@ -79,10 +79,10 @@ var CloudCommander, Util, DOM;
}
else if(lKeyCode === KEY.G && event.altKey)
Util.exec(cloudcmd.Storage);
Util.exec(cloudcmd.GitHub);
else if(lKeyCode === KEY.D && event.altKey){
Util.exec(cloudcmd.Storage);
Util.exec(cloudcmd.DropBox);
event.preventDefault();
}

View file

@ -7,7 +7,6 @@ var CloudCommander, Util, DOM, Dropbox;
const cloudcmd = CloudCommander;
var CLIENT_ID,
Storage = cloudcmd.Storage,
DropBoxStore = {},
options = {
linkType: "direct",
@ -43,9 +42,10 @@ var CloudCommander, Util, DOM, Dropbox;
Dropbox.choose(options);
};
Storage.init = function(){
DropBoxStore.init = function(){
load();
this.init = null;
};
Storage.DropBoxStore = DropBoxStore;
cloudcmd.DropBox = DropBoxStore;
})();

View file

@ -14,7 +14,6 @@ var CloudCommander, Util, DOM, $, Github, cb;
var GitHub_ID,
GithubLocal,
User,
Storage = cloudcmd.Storage = {},
GithubStore = {};
/* temporary callback function for work with github */
@ -65,7 +64,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
/* PUBLICK FUNCTIONS */
GithubStore.basicLogin = function(pUser, pPasswd){
cloudcmd.Storage.Github = GithubLocal = new Github({
GithubLocal = new Github({
username: pUser,
password: pPasswd,
auth : 'basic'
@ -73,7 +72,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
};
GithubStore.Login = function(pToken){
cloudcmd.Storage.Github = Github = GithubLocal = new Github({
Github = GithubLocal = new Github({
token : pToken,
auth : 'oauth'
});
@ -159,14 +158,16 @@ var CloudCommander, Util, DOM, $, Github, cb;
User.show(null, lShowUserInfo);
}
Storage.init = function(){
cloudcmd.GitHub.init = function(){
Util.loadOnLoad([
getUserData,
init,
setConfig,
load
]);
this.init = null;
};
Storage.GithubStore = GithubStore;
cloudcmd.Github = GithubStore;
})();