diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-12-12 09:03:11 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-12-12 09:03:11 -0800 |
commit | 27d9af36dbbb7f8b648d845c88d56909b7ec8275 (patch) | |
tree | b3ed8d504c71851bb04802b1d4c78373def33ad0 | |
parent | fc13b9802e35f284d076637666d71e1d64010204 (diff) | |
parent | 79719d9ae521c285b8eeee97073860a0ab122577 (diff) | |
download | nextcloud-server-27d9af36dbbb7f8b648d845c88d56909b7ec8275.tar.gz nextcloud-server-27d9af36dbbb7f8b648d845c88d56909b7ec8275.zip |
Merge pull request #6356 from owncloud/fix_6353
[trashbin] toggle select all checkbox
-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(); }); |