summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r--apps/files_trashbin/js/filelist.js20
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