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

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;