mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
chore(dom) promptDeleteSelected
This commit is contained in:
parent
daa8ac9e44
commit
0a5e5a9f02
1 changed files with 7 additions and 9 deletions
|
|
@ -761,7 +761,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @pCurrentFile
|
||||
*/
|
||||
this.promptDeleteSelected = function(pCurrentFile) {
|
||||
var ret,
|
||||
var ret, lType, isDir,
|
||||
lCurrent, query, msg,
|
||||
name = '',
|
||||
msgAsk = 'Do you really want to delete the ',
|
||||
|
|
@ -783,27 +783,25 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
msg = msgAsk + msgSel + n + ' files/directoris?\n' + name ;
|
||||
query = '?files';
|
||||
} else {
|
||||
var lType, lIsDir;
|
||||
|
||||
/* dom element passed and it is not event */
|
||||
if (pCurrentFile && !pCurrentFile.pType)
|
||||
lCurrent = pCurrentFile;
|
||||
else
|
||||
lCurrent = Cmd.getCurrentFile();
|
||||
|
||||
lIsDir = Cmd.isCurrentIsDir(lCurrent);
|
||||
isDir = Cmd.isCurrentIsDir(lCurrent);
|
||||
|
||||
if (lIsDir) {
|
||||
if (isDir) {
|
||||
query = '?dir';
|
||||
lType ='directory';
|
||||
type ='directory';
|
||||
}
|
||||
else
|
||||
lType = 'file';
|
||||
type = 'file';
|
||||
|
||||
lType += ' ';
|
||||
type += ' ';
|
||||
|
||||
name = Cmd.getCurrentName(lCurrent);
|
||||
msg = msgAsk + msgSel + lType + name + '?';
|
||||
msg = msgAsk + msgSel + type + name + '?';
|
||||
}
|
||||
|
||||
if (name !== '..')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue