diff options
author | Abijeet <abijeetpatro@gmail.com> | 2018-06-06 23:31:25 +0530 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-18 07:39:44 +0200 |
commit | 0c77b93b8674db71df7d6ca24a8de600818175f6 (patch) | |
tree | 4a6e33e6e258055cce18a5bcbe6541a21928aadd /apps/files_trashbin/js | |
parent | e89f6590e2983c55b1a15f700eb3258554f36197 (diff) | |
download | nextcloud-server-0c77b93b8674db71df7d6ca24a8de600818175f6.tar.gz nextcloud-server-0c77b93b8674db71df7d6ca24a8de600818175f6.zip |
Fixes issues found during running of test cases.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r-- | apps/files_trashbin/js/filelist.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js index 4846c2361fe..32b151ae684 100644 --- a/apps/files_trashbin/js/filelist.js +++ b/apps/files_trashbin/js/filelist.js @@ -153,7 +153,6 @@ } this.fileSummary.update(); this.updateEmptyContent(); - this.enableActions(); }, _onClickRestoreSelected: function(event) { @@ -162,7 +161,7 @@ var allFiles = this.$el.find('.select-all').is(':checked'); var files = []; var params = {}; - this.disableActions(); + this.fileMultiSelectMenu.toggleLoading('restore', true); if (allFiles) { this.showMask(); params = { @@ -192,13 +191,14 @@ self.hideMask(); // simply remove all files self.setFiles([]); - self.enableActions(); } else { self._removeCallback(result); } + self.fileMultiSelectMenu.toggleLoading('restore', true); } ); + event.preventDefault(); }, _onClickDeleteSelected: function(event) { @@ -221,7 +221,7 @@ }; } - this.disableActions(); + this.fileMultiSelectMenu.toggleLoading('delete', true); if (allFiles) { this.showMask(); } @@ -242,11 +242,11 @@ self.hideMask(); // simply remove all files self.setFiles([]); - self.enableActions(); } else { self._removeCallback(result); } + self.fileMultiSelectMenu.toggleLoading('delete', false); } ); }, @@ -268,16 +268,6 @@ return '#'; }, - enableActions: function() { - this.$el.find('.action').css('display', 'inline'); - this.$el.find('input:checkbox').removeClass('u-hidden'); - }, - - disableActions: function() { - this.$el.find('.action').css('display', 'none'); - this.$el.find('input:checkbox').addClass('u-hidden'); - }, - updateStorageStatistics: function() { // no op because the trashbin doesn't have // storage info like free space / used space |