diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 11:29:46 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 11:29:46 +0200 |
commit | ba16fd0d337fa26114f55086198979d147a298c1 (patch) | |
tree | 39111cec77d17d5eeb60bd1b609e7a8419310459 /apps/files/js/filelist.js | |
parent | 5ace43f43895cba4b398367e10731f92450d7da2 (diff) | |
parent | ed28885d73181e61c06802639910014e8a265e42 (diff) | |
download | nextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.tar.gz nextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.zip |
Merge branch 'master' into sync-master
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 4f4c833a5f3..cb0df9eaf20 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1569,7 +1569,7 @@ return false; } - if (status === 404) { + if (status === 404 || status === 405) { // go back home this.changeDirectory('/'); return false; @@ -2548,12 +2548,13 @@ var self = this; // handle upload events - var fileUploadStart = this.$el.find('#file_upload_start'); + var fileUploadStart = this.$el; + var delegatedElement = '#file_upload_start'; // detect the progress bar resize fileUploadStart.on('resized', this._onResize); - fileUploadStart.on('fileuploaddrop', function(e, data) { + fileUploadStart.on('fileuploaddrop', delegatedElement, function(e, data) { OC.Upload.log('filelist handle fileuploaddrop', e, data); if (self.$el.hasClass('hidden')) { @@ -2561,7 +2562,8 @@ return false; } - var dropTarget = $(e.originalEvent.target); + var dropTarget = $(e.delegatedEvent.target); + // check if dropped inside this container and not another one if (dropTarget.length && !self.$el.is(dropTarget) // dropped on list directly |