summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-04-04 18:46:08 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-28 14:55:01 +0200
commitfd982df6aea09492e02cc65de02ee8250a1a229c (patch)
treee3ed5de2072c3110147db0c411e153e98d0abf32 /apps/files_trashbin/js
parenta952d80ad9e57931f6a8fcb94ef6cab4f982149c (diff)
downloadnextcloud-server-fd982df6aea09492e02cc65de02ee8250a1a229c.tar.gz
nextcloud-server-fd982df6aea09492e02cc65de02ee8250a1a229c.zip
Fixed selection to be based on FileList.files
The file selection is now based on the internal model array FileList.files instead of the visible checkboxes. This makes it possible to virtually select files that haven't been rendered yet (select all, then deselect a visible one) Added more unit tests for selection (with shift and ctrl as well)
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r--apps/files_trashbin/js/filelist.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js
index d4445e11c86..42ab89ef6a6 100644
--- a/apps/files_trashbin/js/filelist.js
+++ b/apps/files_trashbin/js/filelist.js
@@ -113,7 +113,7 @@
};
}
else {
- files = FileList.getSelectedFiles('name');
+ files = _.pluck(FileList.getSelectedFiles(), 'name');
for (var i = 0; i < files.length; i++) {
var deleteAction = FileList.findFileEl(files[i]).children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
@@ -155,7 +155,7 @@
};
}
else {
- files = FileList.getSelectedFiles('name');
+ files = _.pluck(FileList.getSelectedFiles(), 'name');
params = {
files: JSON.stringify(files),
dir: FileList.getCurrentDirectory()