diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-12 13:27:53 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-12 13:27:53 +0100 |
commit | 5f7c115dfee58db718d0887562a5a8df8ccc7279 (patch) | |
tree | ee982ca63a9324bfff51e2921124e305b2827d10 /apps | |
parent | 331d73c3a37e74f1e322b9bfb239940275422a65 (diff) | |
parent | 512ba327f76aae0832c8e338acebcbdd6a661def (diff) | |
download | nextcloud-server-5f7c115dfee58db718d0887562a5a8df8ccc7279.tar.gz nextcloud-server-5f7c115dfee58db718d0887562a5a8df8ccc7279.zip |
Merge pull request #13268 from owncloud/dnd-files-container
Allow dropping files on the table container
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2027f62aa02..d6d5bcf912e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1832,9 +1832,18 @@ fileUploadStart.on('fileuploaddrop', function(e, data) { OC.Upload.log('filelist handle fileuploaddrop', e, data); + if (self.$el.hasClass('hidden')) { + // do not upload to invisible lists + return false; + } + var dropTarget = $(e.originalEvent.target); // check if dropped inside this container and not another one - if (dropTarget.length && !self.$el.is(dropTarget) && !self.$el.has(dropTarget).length) { + if (dropTarget.length + && !self.$el.is(dropTarget) // dropped on list directly + && !self.$el.has(dropTarget).length // dropped inside list + && !dropTarget.is(self.$container) // dropped on main container + ) { return false; } |