mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactored
This commit is contained in:
parent
a299a2ed3f
commit
0fa6fea33a
1 changed files with 12 additions and 11 deletions
|
|
@ -76,11 +76,13 @@ var CloudCommander, Util, DOM, $;
|
|||
DOM.getCurrentData(function(pParams){
|
||||
var lObject = CloudCmd[pObjectName];
|
||||
|
||||
if('init' in lObject)
|
||||
lObject.uploadFile(pParams);
|
||||
else
|
||||
Util.exec(lObject, function(){
|
||||
Util.ifExec('init' in lObject,
|
||||
function(){
|
||||
CloudCmd[pObjectName].uploadFile(pParams);
|
||||
},
|
||||
|
||||
function(pCallBack){
|
||||
Util.exec(lObject, pCallBack);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -157,8 +159,8 @@ var CloudCommander, Util, DOM, $;
|
|||
'Download' : function(key, opt){
|
||||
DOM.Images.showLoad();
|
||||
|
||||
var lPath = DOM.getCurrentPath(),
|
||||
lId = DOM.getIdBySrc(lPath);
|
||||
var lPath = DOM.getCurrentPath(),
|
||||
lId = DOM.getIdBySrc(lPath);
|
||||
|
||||
Util.log('downloading file ' + lPath +'...');
|
||||
|
||||
|
|
@ -284,13 +286,12 @@ var CloudCommander, Util, DOM, $;
|
|||
*/
|
||||
Menu.show = function(){
|
||||
set();
|
||||
|
||||
DOM.Images.hideLoad();
|
||||
|
||||
if(Position && Position.x && Position.y)
|
||||
$('li').contextMenu(Position);
|
||||
else
|
||||
$('li').contextMenu();
|
||||
if(Position && !Position.x )
|
||||
Position = null;
|
||||
|
||||
$('li').contextMenu(Position);
|
||||
};
|
||||
|
||||
/* key binding function */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue