Ticket #35578: 35578.diff
File 35578.diff, 3.8 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/nav-menus.css
642 642 box-shadow: 0 1px 1px rgba(0,0,0,0.04); 643 643 } 644 644 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 { 646 657 display: none; 647 658 margin: 0 2px; 659 color: #0073aa; 660 font-style: italic; 661 text-decoration: underline; 648 662 } 649 663 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 650 679 .menu-item-edit-active .menu-item-settings { 651 680 display: block; 652 681 } -
src/wp-admin/includes/class-walker-nav-menu-edit.php
197 197 </label> 198 198 </p> 199 199 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> 210 208 211 209 <div class="menu-item-actions description-wide submitbox"> 212 210 <?php if ( 'custom' != $item->type && $original_title !== false ) : ?> -
src/wp-admin/js/nav-menu.js
406 406 } ); 407 407 408 408 // Links for moving items 409 menu.on( 'click', '.menus-move', function ( e) {409 menu.on( 'click', '.menus-move', function () { 410 410 var $this = $( this ), 411 411 dir = $this.data( 'dir' ); 412 412 … … 413 413 if ( 'undefined' !== typeof dir ) { 414 414 api.moveMenuItem( $( this ).parents( 'li.menu-item' ).find( 'a.item-edit' ), dir ); 415 415 } 416 e.preventDefault();417 416 }); 418 417 }, 419 418 … … 515 514 */ 516 515 refreshAdvancedAccessibility : function() { 517 516 518 // Hide all links by default519 $( '.menu-item-settings .field-move a' ).hide();517 // Hide all the move buttons by default. 518 $( '.menu-item-settings .field-move .menus-move' ).hide(); 520 519 521 520 // Mark all menu items as unprocessed 522 521 $( 'a.item-edit' ).data( 'needs_accessibility_refresh', true );