mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(menu) retFunc -> bind
This commit is contained in:
parent
974cbb6b1b
commit
dd5370074f
1 changed files with 6 additions and 6 deletions
|
|
@ -155,7 +155,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
async : false,
|
||||
className : 'hidden',
|
||||
src : lPath,
|
||||
func : Util.retFunc(DOM.Images.hideLoad)
|
||||
func : DOM.Images.hideLoad
|
||||
});
|
||||
|
||||
DOM.Images.hideLoad();
|
||||
|
|
@ -175,12 +175,12 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
function getConfig () {
|
||||
var lRet,
|
||||
lMenuItems = {
|
||||
'View' : Util.retFunc(show, 'View'),
|
||||
'Edit' : Util.retFunc(show, 'Edit'),
|
||||
'View' : show.bind(null, 'View'),
|
||||
'Edit' : show.bind(null, 'Edit'),
|
||||
'Rename' : function() {
|
||||
setTimeout( Util.retFunc(DOM.renameCurrent), 100);
|
||||
setTimeout(DOM.renameCurrent, 100);
|
||||
},
|
||||
'Delete' : Util.retFunc(DOM.promptDeleteSelected),
|
||||
'Delete' : DOM.promptDeleteSelected,
|
||||
'(Un)Select All': DOM.toggleAllSelectedFiles,
|
||||
'Zip file' : DOM.zipFile
|
||||
};
|
||||
|
|
@ -188,7 +188,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
if (UploadToItemNames.length)
|
||||
lMenuItems['Upload to'] = getUploadToItems(UploadToItemNames);
|
||||
|
||||
lMenuItems.Download = Util.retFunc(downloadFromMenu);
|
||||
lMenuItems.Download = downloadFromMenu;
|
||||
|
||||
lMenuItems.New = {
|
||||
'File' : DOM.promptNewFile,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue