diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-04 18:46:08 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-28 14:55:01 +0200 |
commit | fd982df6aea09492e02cc65de02ee8250a1a229c (patch) | |
tree | e3ed5de2072c3110147db0c411e153e98d0abf32 /apps/files_trashbin/js | |
parent | a952d80ad9e57931f6a8fcb94ef6cab4f982149c (diff) | |
download | nextcloud-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.js | 4 |
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() |