]> source.dussan.org Git - nextcloud-server.git/commitdiff
disabling dropping on dragging objects temporarily 2119/head
authorMichael Jobst <mjobst@necls.com>
Sat, 5 Nov 2016 19:29:56 +0000 (20:29 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 14 Nov 2016 14:35:25 +0000 (15:35 +0100)
better solution

apps/files/js/files.js

index 1681e2c7e488d73f1539d911a2467bdc973d9f40..99f888ce0f71d6a671a553860a53ea1b97b564b7 100644 (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;
-