diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-19 14:30:21 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-19 14:30:21 +0200 |
commit | bd6beaaae215f6d9a531af9844ce869a8031b079 (patch) | |
tree | 0cea04eedca87da3e29afffe6bd4a183400ff48e /apps/files | |
parent | a9bb6be019a88e29ebb0b227fd7c0f36e2a7383b (diff) | |
parent | 009c008ed888164202cefff54084b7f8c84b6bc6 (diff) | |
download | nextcloud-server-bd6beaaae215f6d9a531af9844ce869a8031b079.tar.gz nextcloud-server-bd6beaaae215f6d9a531af9844ce869a8031b079.zip |
Merge pull request #18354 from owncloud/files-fixdnd
Fix file drag and drop JS error
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 5 | ||||
-rw-r--r-- | apps/files/js/files.js | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e7becb01207..68c1f9d919f 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -608,6 +608,7 @@ * Event handler when dropping on a breadcrumb */ _onDropOnBreadCrumb: function( event, ui ) { + var self = this; var $target = $(event.target); if (!$target.is('.crumb')) { $target = $target.closest('.crumb'); @@ -629,7 +630,9 @@ var files = this.getSelectedFiles(); if (files.length === 0) { // single one selected without checkbox? - files = _.map(ui.helper.find('tr'), this.elementToFile); + files = _.map(ui.helper.find('tr'), function(el) { + return self.elementToFile($(el)); + }); } this.move(_.pluck(files, 'name'), targetPath); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 90c8ee67757..245648a79e2 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -453,7 +453,9 @@ var folderDropOptions = { var files = FileList.getSelectedFiles(); if (files.length === 0) { // single one selected without checkbox? - files = _.map(ui.helper.find('tr'), FileList.elementToFile); + files = _.map(ui.helper.find('tr'), function(el) { + return FileList.elementToFile($(el)); + }); } FileList.move(_.pluck(files, 'name'), targetPath); |