diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-17 16:03:05 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-17 16:09:29 +0200 |
commit | 009c008ed888164202cefff54084b7f8c84b6bc6 (patch) | |
tree | dfc33e222445a63be7c99af3aaf1e687d3a89a57 /apps | |
parent | 675d852c7d141f2dd83c32bb82a8c894838d6907 (diff) | |
download | nextcloud-server-009c008ed888164202cefff54084b7f8c84b6bc6.tar.gz nextcloud-server-009c008ed888164202cefff54084b7f8c84b6bc6.zip |
Fix file drag and drop JS error
Diffstat (limited to 'apps')
-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 4802e07e965..e00cbfa66ab 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 55fdb96ebda..f70055d0f52 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); |