Make WordPress Core

Changeset 21209


Ignore:
Timestamp:
07/05/2012 02:08:20 PM (14 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/common.dev.js

    r21090 r21209  
    276276                }
    277277                lastClicked = this;
     278
     279                // toggle "check all" checkboxes
     280                var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible').not(':checked');
     281                $(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
     282                        return ( 0 == unchecked.length );
     283                });
     284
    278285                return true;
    279286        });
Note: See TracChangeset for help on using the changeset viewer.