diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-08 16:56:12 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-28 14:55:01 +0200 |
commit | 3c006a5a4d00f8852de6a586fb987baa50a067ea (patch) | |
tree | 95245910cd084c3c3556b350ed0a596f6b1891d3 | |
parent | 3159c2ee641e329c2fbaa5efbf9ac994795efa1d (diff) | |
download | nextcloud-server-3c006a5a4d00f8852de6a586fb987baa50a067ea.tar.gz nextcloud-server-3c006a5a4d00f8852de6a586fb987baa50a067ea.zip |
Cleanup and fix trashbin "clear all files" operation
-rw-r--r-- | apps/files/js/filelist.js | 6 | ||||
-rw-r--r-- | apps/files_trashbin/js/filelist.js | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7c82ec92473..cf359af4aa2 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -26,7 +26,6 @@ window.FileList = { // number of files per page pageSize: 20, - totalPages: 0, /** * Array of files in the current folder. @@ -358,8 +357,6 @@ window.FileList = { return; } - this.pageNumber++; - while (count > 0 && index < this.files.length) { fileData = this.files[index]; tr = this._renderRow(fileData, {updateSummary: false}); @@ -394,8 +391,6 @@ window.FileList = { setFiles: function(filesArray) { // detach to make adding multiple rows faster this.files = filesArray; - this.pageNumber = -1; - this.totalPages = Math.ceil(filesArray.length / this.pageSize); this.$fileList.detach(); this.$fileList.empty(); @@ -847,6 +842,7 @@ window.FileList = { if (this._selectedFiles[fileEl.data('id')]) { // remove from selection first this._selectFileEl(fileEl, false); + this.updateSelectionSummary(); } if (fileEl.data('permissions') & OC.PERMISSION_DELETE) { // file is only draggable when delete permissions are set diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js index 42ab89ef6a6..3bb3a92b60d 100644 --- a/apps/files_trashbin/js/filelist.js +++ b/apps/files_trashbin/js/filelist.js @@ -133,7 +133,7 @@ } FileList.hideMask(); // simply remove all files - FileList.update(''); + FileList.setFiles([]); enableActions(); } else { |