Don't display the popup whne moving a file to the trash
This commit is contained in:
parent
497ddeee6d
commit
e51f678bb9
@ -965,23 +965,7 @@ define([
|
|||||||
if (filesOp.isPathIn(newPath, [TRASH]) && paths.length && paths[0][0] === TRASH) {
|
if (filesOp.isPathIn(newPath, [TRASH]) && paths.length && paths[0][0] === TRASH) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// "force" is currently unused but may be configurable by user
|
andThen();
|
||||||
if (newPath[0] !== TRASH || force) {
|
|
||||||
andThen();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var msg = Messages._getKey('fm_removeSeveralDialog', [paths.length]);
|
|
||||||
if (paths.length === 1) {
|
|
||||||
var path = paths[0].slice();
|
|
||||||
var el = filesOp.find(path);
|
|
||||||
var name = filesOp.isFile(el) ? getElementName(path) : path.pop();
|
|
||||||
msg = Messages._getKey('fm_removeDialog', [name]);
|
|
||||||
}
|
|
||||||
Cryptpad.confirm(msg, function (res) {
|
|
||||||
$(ifrw).focus();
|
|
||||||
if (!res) { return; }
|
|
||||||
andThen();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
// Drag & drop:
|
// Drag & drop:
|
||||||
// The data transferred is a stringified JSON containing the path of the dragged element
|
// The data transferred is a stringified JSON containing the path of the dragged element
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user