disabling dropping on dragging objects temporarily

better solution
This commit is contained in:
Michael Jobst 2016-11-05 20:29:56 +01:00 committed by Morris Jobke
parent cebb689925
commit 03cbc7217c
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
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;