summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-17 16:03:05 +0200
committerVincent Petry <pvince81@owncloud.com>2015-08-17 16:09:29 +0200
commit009c008ed888164202cefff54084b7f8c84b6bc6 (patch)
treedfc33e222445a63be7c99af3aaf1e687d3a89a57 /apps
parent675d852c7d141f2dd83c32bb82a8c894838d6907 (diff)
downloadnextcloud-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.js5
-rw-r--r--apps/files/js/files.js4
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);