Uncheck the "select all" checkbox when one of the child checkboxes is manually unchecked. props SergeyBiryukov. fixes #20261

git-svn-id: http://core.svn.wordpress.org/trunk@21209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-07-05 14:08:20 +00:00
parent 6960c76644
commit 57b977d781

View File

@ -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;
});