mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
fix(operation) deleteSilent: work with outdated dom elements
This commit is contained in:
parent
249b8c5729
commit
b2af840ea3
1 changed files with 7 additions and 4 deletions
|
|
@ -290,7 +290,7 @@
|
|||
query = '?files',
|
||||
Info = DOM.CurrentInfo,
|
||||
path = Info.dirPath,
|
||||
current = Info.element;
|
||||
name = Info.name;
|
||||
|
||||
showLoad();
|
||||
|
||||
|
|
@ -305,13 +305,16 @@
|
|||
|
||||
deleteFn(path + query, names, function(error) {
|
||||
var Storage = DOM.Storage,
|
||||
dirPath = Info.dirPath;
|
||||
dirPath = Info.dirPath,
|
||||
delCurrent = DOM.deleteCurrent,
|
||||
delSelected = DOM.deleteSelected,
|
||||
getByName = DOM.getCurrentByName;
|
||||
|
||||
if (!error) {
|
||||
if (n > 1)
|
||||
DOM.deleteSelected(files);
|
||||
delSelected(files);
|
||||
else
|
||||
DOM.deleteCurrent(current);
|
||||
delCurrent(getByName(name));
|
||||
|
||||
Storage.removeMatch(dirPath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue