diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-12 16:45:45 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-12 17:33:04 +0100 |
commit | 79719d9ae521c285b8eeee97073860a0ab122577 (patch) | |
tree | fd89af4d1fa8dedd4e070b9f4c3d4ef28c17f4b2 /apps/files_trashbin/js | |
parent | 5ba9344b0ef50f1e312454067486eeceeead565c (diff) | |
download | nextcloud-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.js | 8 |
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(); }); |