mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
feature(cloudcmd) retExec -> retFunc
This commit is contained in:
parent
996877f1c2
commit
bed4543a6f
7 changed files with 12 additions and 12 deletions
|
|
@ -143,7 +143,7 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
|
||||
lCallBack = function(){
|
||||
Util.loadOnLoad([
|
||||
Util.retExec(CloudCmd.route, location.hash),
|
||||
Util.retFunc(CloudCmd.route, location.hash),
|
||||
baseInit,
|
||||
initModules,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
|
||||
if (lText) {
|
||||
Util.log(lText);
|
||||
setTimeout(Util.retExec(alert, lText), 100);
|
||||
setTimeout(Util.retFunc(alert, lText), 100);
|
||||
}
|
||||
|
||||
return lErrorImage;
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ var Util, DOM, CloudCmd;
|
|||
}
|
||||
|
||||
function online() {
|
||||
var cssSet = Util.retExec(DOM.cssSet, {
|
||||
var cssSet = Util.retFunc(DOM.cssSet, {
|
||||
id :'local-droids-font',
|
||||
element : document.head,
|
||||
inner : '@font-face {font-family: "Droid Sans Mono";' +
|
||||
|
|
|
|||
|
|
@ -174,12 +174,12 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
function getConfig (){
|
||||
var lRet,
|
||||
lMenuItems = {
|
||||
'View' : Util.retExec(show, 'View'),
|
||||
'Edit' : Util.retExec(show, 'Edit'),
|
||||
'View' : Util.retFunc(show, 'View'),
|
||||
'Edit' : Util.retFunc(show, 'Edit'),
|
||||
'Rename' : function(){
|
||||
setTimeout( Util.retExec(DOM.renameCurrent), 100);
|
||||
setTimeout( Util.retFunc(DOM.renameCurrent), 100);
|
||||
},
|
||||
'Delete' : Util.retExec(DOM.promptDeleteSelected),
|
||||
'Delete' : Util.retFunc(DOM.promptDeleteSelected),
|
||||
'(Un)Select All': DOM.toggleAllSelectedFiles,
|
||||
'Zip file' : DOM.zipFile
|
||||
};
|
||||
|
|
@ -187,7 +187,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
if (UploadToItemNames.length)
|
||||
lMenuItems['Upload to'] = getUploadToItems(UploadToItemNames);
|
||||
|
||||
lMenuItems.Download = Util.retExec(downloadFromMenu);
|
||||
lMenuItems.Download = Util.retFunc(downloadFromMenu);
|
||||
|
||||
lMenuItems.New = {
|
||||
'File' : DOM.promptNewFile,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ var CloudCmd, Util, DOM, io;
|
|||
'npm i socket.io';
|
||||
|
||||
DOM.jsload('/socket.io/lib/socket.io.js', {
|
||||
onerror : Util.retExec(Util.log, ERROR_MSG),
|
||||
onerror : Util.retFunc(Util.log, ERROR_MSG),
|
||||
onload : connect
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
for (var i = 0; i < n; i++) {
|
||||
lDirPath = path.join(lPath, pFiles[i]);
|
||||
process.nextTick( Util.retExec(getDirInfo, lDirPath) );
|
||||
process.nextTick(Util.retFunc(getDirInfo, lDirPath));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@
|
|||
var lFiles = Util.parseJSON(pBody),
|
||||
n = lFiles.length,
|
||||
lDir = p.name,
|
||||
log = Util.retExec(Util.log),
|
||||
log = Util.log,
|
||||
lAssync = 0;
|
||||
|
||||
function stat(pStat) {
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
|
||||
if (p.error){
|
||||
main.sendError(pParams, p.error);
|
||||
Util.log(p.error);
|
||||
log(p.error);
|
||||
}
|
||||
else
|
||||
if (p.data.isDirectory())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue