summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-12 16:45:45 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-12 17:33:04 +0100
commit79719d9ae521c285b8eeee97073860a0ab122577 (patch)
treefd89af4d1fa8dedd4e070b9f4c3d4ef28c17f4b2 /apps/files_trashbin/js
parent5ba9344b0ef50f1e312454067486eeceeead565c (diff)
downloadnextcloud-server-79719d9ae521c285b8eeee97073860a0ab122577.tar.gz
nextcloud-server-79719d9ae521c285b8eeee97073860a0ab122577.zip
toggle select all checkbox
Diffstat (limited to 'apps/files_trashbin/js')
-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();
});