Merge pull request #2119 from nextcloud/downstream-26555

disabling dropping on dragging objects temporarily
This commit is contained in:
Roeland Jago Douma 2016-11-14 17:45:15 +01:00 committed by GitHub
commit d5afe2f3ca
1 changed files with 5 additions and 1 deletions

View File

@ -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;