aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-13 17:12:36 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-13 17:12:36 +0200
commit88da2966b49e378fa458e5da6dfa6feedd415b21 (patch)
tree52a18d0908eb52a91fc18ddf53ea37388eaa45a0 /apps/files/js/filelist.js
parentddea34f95918151529e18988e188ba913bed2c8f (diff)
parent48430d4481456425422163ed5a46e9e0fcd35ecd (diff)
downloadnextcloud-server-88da2966b49e378fa458e5da6dfa6feedd415b21.tar.gz
nextcloud-server-88da2966b49e378fa458e5da6dfa6feedd415b21.zip
Merge pull request #22341 from owncloud/pellaeon-pr-breadcrumb-filelist-overlap-drop
Handle case when breadcrumb and filelist item overlap and both receive a drop
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 9395112bce3..ef29a4844bf 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -271,6 +271,12 @@
// if dropping on folders is allowed, then also allow on breadcrumbs
if (this._folderDropOptions) {
breadcrumbOptions.onDrop = _.bind(this._onDropOnBreadCrumb, this);
+ breadcrumbOptions.onOver = function() {
+ self.$el.find('td.filename.ui-droppable').droppable('disable');
+ }
+ breadcrumbOptions.onOut = function() {
+ self.$el.find('td.filename.ui-droppable').droppable('enable');
+ }
}
this.breadcrumb = new OCA.Files.BreadCrumb(breadcrumbOptions);
@@ -785,6 +791,13 @@
}
this.move(_.pluck(files, 'name'), targetPath);
+
+ // re-enable td elements to be droppable
+ // sometimes the filename drop handler is still called after re-enable,
+ // it seems that waiting for a short time before re-enabling solves the problem
+ setTimeout(function() {
+ self.$el.find('td.filename.ui-droppable').droppable('enable');
+ }, 10);
},
/**