Delete multiple elements could also remove unselected ones

This commit is contained in:
yflory
2017-01-26 16:18:43 +01:00
parent b79e1e48c7
commit c44f3a1044
2 changed files with 64 additions and 7 deletions

View File

@@ -1641,10 +1641,8 @@ define([
});
// If we are in the trash or anon pad or if we are holding the "shift" key, delete permanently,
if (isTrash || e.shiftKey) {
var cb = filesOp.removeFromTrash; // We're in the trash
if (!isTrash) {
cb = filesOp.deletePathPermanently; // We're in root/unsorted/template
}
//var cb = filesOp.removeFromTrash; // We're in the trash
//if (!isTrash) { cb = filesOp.deletePathPermanently; } // We're in root
var msg = Messages._getKey("fm_removeSeveralPermanentlyDialog", [paths.length]);
if (paths.length === 1) {
@@ -1653,9 +1651,7 @@ define([
Cryptpad.confirm(msg, function(res) {
if (!res) { return; }
paths.forEach(function(p) {
cb(p);
});
filesOp.deletePathsPermanently(paths);
refresh();
});
return;