Uncheck the "select all" checkbox when one of the child checkboxes is manually unchecked. props SergeyBiryukov. fixes #20261
git-svn-id: https://develop.svn.wordpress.org/trunk@21209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e7d8706111
commit
1f25a79a65
@ -275,6 +275,13 @@ $(document).ready( function() {
|
||||
}
|
||||
}
|
||||
lastClicked = this;
|
||||
|
||||
// toggle "check all" checkboxes
|
||||
var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible').not(':checked');
|
||||
$(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
|
||||
return ( 0 == unchecked.length );
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user