feature(cloudcmd) retExec -> retFunc

This commit is contained in:
coderaiser 2013-10-21 10:44:10 +00:00
parent 996877f1c2
commit bed4543a6f
7 changed files with 12 additions and 12 deletions

View file

@ -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,
]);

View file

@ -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;

View file

@ -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";' +

View file

@ -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,

View file

@ -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
});

View file

@ -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));
}
}

View file

@ -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())