summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_trashbin/js/trash.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 48e9629f7de..1ff5bac6130 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -152,6 +152,14 @@ $(document).ready(function() {
$('#fileList').on('click', 'td.filename input', function() {
var checkbox = $(this).parent().children('input:checkbox');
$(checkbox).parent().parent().toggleClass('selected');
+ if ($(checkbox).is(':checked')) {
+ var selectedCount = $('td.filename input:checkbox:checked').length;
+ if (selectedCount === $('td.filename input:checkbox').length) {
+ $('#select_all').prop('checked', true);
+ }
+ } else {
+ $('#select_all').prop('checked',false);
+ }
procesSelection();
});