Add possibility to drop files on the path bar to move them in drive

This commit is contained in:
ClemDee
2019-08-01 14:18:17 +02:00
parent 1395c1a8ac
commit aae71c43d2
2 changed files with 17 additions and 4 deletions

View File

@@ -1530,7 +1530,13 @@ define([
var findDropPath = function (target) {
var $target = $(target);
var $el = findDataHolder($target);
var $el;
if ($target.is(".cp-app-drive-path-element")) {
$el = $target;
}
else {
$el = findDataHolder($target);
}
var newPath = $el.data('path');
var dropEl = newPath && manager.find(newPath);
if (newPath && manager.isSharedFolder(dropEl)) {
@@ -1975,6 +1981,8 @@ define([
} else if (idx > 0 && manager.isFile(el)) {
name = getElementName(path);
}
$span.data("path", path.slice(0, idx + 1));
addDragAndDropHandlers($span, path.slice(0, idx), true, true);
if (idx === 0) { name = p === SHARED_FOLDER ? name : getPrettyName(p); }
else {