Make WordPress Core

Ticket #32309: 32309.diff

File 32309.diff, 1.3 KB (added by tywayne, 10 years ago)
  • wp-admin/js/common.js

     
    402402                if ( 'undefined' == e.shiftKey ) { return true; }
    403403                if ( e.shiftKey ) {
    404404                        if ( !lastClicked ) { return true; }
    405                         checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' );
     405                        checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' ).filter( ':visible:enabled' );
    406406                        first = checks.index( lastClicked );
    407407                        last = checks.index( this );
    408408                        checked = $(this).prop('checked');
     
    419419                lastClicked = this;
    420420
    421421                // toggle "check all" checkboxes
    422                 var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible').not(':checked');
     422                var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible:enabled').not(':checked');
    423423                $(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
    424424                        return ( 0 === unchecked.length );
    425425                });
     
    436436                $table.children( 'tbody' ).filter(':visible')
    437437                        .children().children('.check-column').find(':checkbox')
    438438                        .prop('checked', function() {
    439                                 if ( $(this).is(':hidden') ) {
     439                                if ( $(this).is(':hidden,:disabled') ) {
    440440                                        return false;
    441441                                }
    442442