From 79719d9ae521c285b8eeee97073860a0ab122577 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 12 Dec 2013 16:45:45 +0100 Subject: [PATCH] toggle select all checkbox --- apps/files_trashbin/js/trash.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); }); -- 2.39.5