summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-11-14 17:45:15 +0100
committerGitHub <noreply@github.com>2016-11-14 17:45:15 +0100
commitd5afe2f3caf1b013a98cdea72e75fe25d6ed4011 (patch)
treeafdb75099f553b041cd9cd2cd159d6bbcf5d8cab
parent0e60b78378e69ec1dc93e2004bc3ca293a4c0548 (diff)
parent03cbc7217c82f08cbf59b9984639fda5317e31e9 (diff)
downloadnextcloud-server-d5afe2f3caf1b013a98cdea72e75fe25d6ed4011.tar.gz
nextcloud-server-d5afe2f3caf1b013a98cdea72e75fe25d6ed4011.zip
Merge pull request #2119 from nextcloud/downstream-26555
disabling dropping on dragging objects temporarily
-rw-r--r--apps/files/js/files.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 1681e2c7e48..99f888ce0f7 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -379,14 +379,19 @@ var dragOptions={
$selectedFiles = $(this);
}
$selectedFiles.closest('tr').addClass('animate-opacity dragging');
+ $selectedFiles.closest('tr').filter('.ui-droppable').droppable( 'disable' );
+
},
stop: function(event, ui) {
var $selectedFiles = $('td.filename input:checkbox:checked');
if (!$selectedFiles.length) {
$selectedFiles = $(this);
}
+
var $tr = $selectedFiles.closest('tr');
$tr.removeClass('dragging');
+ $tr.filter('.ui-droppable').droppable( 'enable' );
+
setTimeout(function() {
$tr.removeClass('animate-opacity');
}, 300);
@@ -454,4 +459,3 @@ function fileDownloadPath(dir, file) {
// for backward compatibility
window.Files = OCA.Files.Files;
-