Make WordPress Core

Changeset 34467


Ignore:
Timestamp:
09/24/2015 01:06:17 AM (9 years ago)
Author:
wonderboymusic
Message:

List Tables: add JS code to dynamically toggle the disabled attribute of the Bulk Actions dropdown and Apply button.

Props wonderboymusic, pareshradadiya.
Fixes #31634.

Location:
trunk/src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r34383 r34467  
    438438            return;
    439439
    440         echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
    441         echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
    442         echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
     440        echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action' ) . '</label>';
     441        echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
     442        echo '<option value="-1">' . __( 'Bulk Actions' ) . "</option>\n";
    443443
    444444        foreach ( $this->_actions as $name => $title ) {
    445445            $class = 'edit' === $name ? ' class="hide-if-no-js"' : '';
    446446
    447             echo "\t<option value='$name'$class>$title</option>\n";
     447            echo "\t" . '<option value="' . $name . '"' . $class . '>' . $title . "</option>\n";
    448448        }
    449449
  • trunk/src/wp-admin/includes/update-core.php

    r33772 r34467  
    280280'wp-admin/images/star.gif',
    281281'wp-admin/js/list-table.dev.js',
    282 'wp-admin/js/list-table.js',
     282//'wp-admin/js/list-table.js', // restored in 4.4
    283283'wp-includes/default-embeds.php',
    284284'wp-includes/js/tinymce/plugins/wordpress/img/help.gif',
  • trunk/src/wp-includes/script-loader.php

    r34311 r34467  
    7878    ) );
    7979
    80     $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
     80    $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils', 'list-table'), false, 1 );
    8181    did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
    8282        'warnDelete' => __( "You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete." ),
     
    397397    $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );
    398398
     399    $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery' ), false, 1 );
     400
    399401    $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
    400402
Note: See TracChangeset for help on using the changeset viewer.