Make WordPress Core

Changeset 10107


Ignore:
Timestamp:
12/07/2008 09:04:38 AM (17 years ago)
Author:
azaozz
Message:

Don't select hidden rows' checkboxes when selecting all, fixes #8520

Location:
trunk
Files:
2 edited

Legend:

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

    r10074 r10107  
    193193            var first = checks.index( lastClicked );
    194194            var last = checks.index( this );
     195            var checked = $(this).attr('checked');
    195196            if ( 0 < first && 0 < last && first != last ) {
    196                 checks.slice( first, last ).attr( 'checked', $( this ).is( ':checked' ) ? 'checked' : '' );
     197                checks.slice( first, last ).attr( 'checked', function(){
     198                    if ( $(this).parents('tr').is(':visible') )
     199                        return checked ? 'checked' : '';
     200
     201                    return '';
     202                });
    197203            }
    198204        }
     
    206212        var toggle = e.shiftKey || toggleWithKeyboard;
    207213        $(this).parents( 'form:first' ).find( 'table tbody:visible').find( '.check-column :checkbox' ).attr( 'checked', function() {
     214            if ( $(this).parents('tr').is(':hidden') )
     215                return '';
    208216            if ( toggle )
    209217                return $(this).attr( 'checked' ) ? '' : 'checked';
  • trunk/wp-includes/script-loader.php

    r10102 r10107  
    4242    $scripts->default_version = get_bloginfo( 'version' );
    4343
    44     $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081206' );
     44    $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081206b' );
    4545    $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
    4646
Note: See TracChangeset for help on using the changeset viewer.