Web: Files: Fixed delete operation without modal dialog.

This commit is contained in:
Tatiana Lopaeva 2021-11-09 15:52:17 +03:00
parent 86269ab984
commit 33944ccb3e

View File

@ -347,13 +347,15 @@ class FilesActionStore {
label: translations.deleteOperation,
};
const selectionFilesLength = 1;
if (isFile) {
this.isMediaOpen();
return deleteFile(itemId)
.then(async (res) => {
const data = res[0] ? res[0] : null;
await this.uploadDataStore.loopFilesOperations(data, pbData);
this.updateCurrentFolder();
this.updateCurrentFolder(selectionFilesLength);
})
.then(() => toastr.success(translations.successRemoveFile));
} else {
@ -361,7 +363,7 @@ class FilesActionStore {
.then(async (res) => {
const data = res[0] ? res[0] : null;
await this.uploadDataStore.loopFilesOperations(data, pbData);
this.updateCurrentFolder();
this.updateCurrentFolder(selectionFilesLength);
})
.then(() => toastr.success(translations.successRemoveFolder));
}