Make WordPress Core

Ticket #35578: 35578.diff

File 35578.diff, 3.8 KB (added by afercia, 8 years ago)
  • src/wp-admin/css/nav-menus.css

     
    642642        box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    643643}
    644644
    645 .menu-item-settings .field-move a {
     645.menu-item-settings .field-move {
     646        margin: 3px 0 5px;
     647        line-height: 1.5;
     648}
     649
     650.field-move-visual-label {
     651        float: left;
     652        margin-right: 4px;
     653        font-style: italic;
     654}
     655
     656.menu-item-settings .field-move .button-link {
    646657        display: none;
    647658        margin: 0 2px;
     659        color: #0073aa;
     660        font-style: italic;
     661        text-decoration: underline;
    648662}
    649663
     664.menu-item-settings .field-move .button-link:hover,
     665.menu-item-settings .field-move .button-link:active {
     666        color: #00a0d2;
     667}
     668
     669.menu-item-settings .field-move .button-link:focus {
     670        color: #124964;
     671        -webkit-box-shadow:
     672                0 0 0 1px #5b9dd9,
     673                0 0 2px 1px rgba(30, 140, 190, .8);
     674        box-shadow:
     675                0 0 0 1px #5b9dd9,
     676                0 0 2px 1px rgba(30, 140, 190, .8);
     677}
     678
    650679.menu-item-edit-active .menu-item-settings {
    651680        display: block;
    652681}
  • src/wp-admin/includes/class-walker-nav-menu-edit.php

     
    197197                                        </label>
    198198                                </p>
    199199
    200                                 <p class="field-move hide-if-no-js description description-wide">
    201                                         <label>
    202                                                 <span><?php _e( 'Move' ); ?></span>
    203                                                 <a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a>
    204                                                 <a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a>
    205                                                 <a href="#" class="menus-move menus-move-left" data-dir="left"></a>
    206                                                 <a href="#" class="menus-move menus-move-right" data-dir="right"></a>
    207                                                 <a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a>
    208                                         </label>
    209                                 </p>
     200                                <fieldset class="field-move hide-if-no-js description description-wide">
     201                                        <span class="field-move-visual-label" aria-hidden="true"><?php _e( 'Move' ); ?></span>
     202                                        <button type="button" class="button-link menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></button>
     203                                        <button type="button" class="button-link menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></button>
     204                                        <button type="button" class="button-link menus-move menus-move-left" data-dir="left"></button>
     205                                        <button type="button" class="button-link menus-move menus-move-right" data-dir="right"></button>
     206                                        <button type="button" class="button-link menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></button>
     207                                </fieldset>
    210208
    211209                                <div class="menu-item-actions description-wide submitbox">
    212210                                        <?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
  • src/wp-admin/js/nav-menu.js

     
    406406                        } );
    407407
    408408                        // Links for moving items
    409                         menu.on( 'click', '.menus-move', function ( e ) {
     409                        menu.on( 'click', '.menus-move', function () {
    410410                                var $this = $( this ),
    411411                                        dir = $this.data( 'dir' );
    412412
     
    413413                                if ( 'undefined' !== typeof dir ) {
    414414                                        api.moveMenuItem( $( this ).parents( 'li.menu-item' ).find( 'a.item-edit' ), dir );
    415415                                }
    416                                 e.preventDefault();
    417416                        });
    418417                },
    419418
     
    515514                 */
    516515                refreshAdvancedAccessibility : function() {
    517516
    518                         // Hide all links by default
    519                         $( '.menu-item-settings .field-move a' ).hide();
     517                        // Hide all the move buttons by default.
     518                        $( '.menu-item-settings .field-move .menus-move' ).hide();
    520519
    521520                        // Mark all menu items as unprocessed
    522521                        $( 'a.item-edit' ).data( 'needs_accessibility_refresh', true );