Merge pull request #6356 from owncloud/fix_6353

[trashbin] toggle select all checkbox
This commit is contained in:
Vincent Petry 2013-12-12 09:03:11 -08:00
commit 27d9af36db
1 changed files with 8 additions and 0 deletions

View File

@ -152,6 +152,14 @@ $(document).ready(function() {
$('#fileList').on('click', 'td.filename input', function() { $('#fileList').on('click', 'td.filename input', function() {
var checkbox = $(this).parent().children('input:checkbox'); var checkbox = $(this).parent().children('input:checkbox');
$(checkbox).parent().parent().toggleClass('selected'); $(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(); procesSelection();
}); });