mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(dom) deleteCurrent: return currentNew
This commit is contained in:
parent
9073b3f89b
commit
34598bb140
1 changed files with 6 additions and 4 deletions
|
|
@ -1554,7 +1554,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
*
|
||||
*/
|
||||
this.deleteCurrent = function(current) {
|
||||
var name, next, prev, parent;
|
||||
var name, next, prev, parent, currentNew;
|
||||
|
||||
if (!current)
|
||||
Cmd.getCurrentFile();
|
||||
|
|
@ -1567,14 +1567,16 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
prev = current.previousSibling;
|
||||
|
||||
if (next)
|
||||
this.setCurrentFile(next);
|
||||
currentNew = next;
|
||||
else if (prev)
|
||||
this.setCurrentFile(prev);
|
||||
currentNew = prev;
|
||||
|
||||
this.setCurrentFile(currentNew);
|
||||
|
||||
parent.removeChild(current);
|
||||
}
|
||||
|
||||
return current;
|
||||
return currentNew;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue