Ticket #23076: 23076.diff
File 23076.diff, 2.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/nav-menus.css
507 507 margin-right: 13em; 508 508 } 509 509 510 .menu-item-handle .menu-item-title.no-title { 511 color: #999; 512 } 513 510 514 /* Sortables */ 511 515 li.menu-item.ui-sortable-helper dl { 512 516 margin-top: 0; -
src/wp-admin/js/nav-menu.js
57 57 this.initAccessibility(); 58 58 59 59 this.initToggles(); 60 61 this.initPreviewing(); 60 62 }, 61 63 62 64 jQueryExtensions : function() { … … 530 532 }); 531 533 }, 532 534 535 initPreviewing : function() { 536 // Update the item handle title when the navigation label is changed. 537 $( '.edit-menu-item-title' ).bind( 'input', function() { 538 var title = $( this ).val(); 539 var titleEl = $( this ).closest( '.menu-item' ).find( '.menu-item-title' ); 540 // Don't update to empty title. 541 if ( title ) { 542 titleEl.text( title ) 543 .removeClass( 'no-title' ); 544 } else { 545 titleEl.text( navMenuL10n.untitled ) 546 .addClass( 'no-title' ); 547 } 548 } ); 549 }, 550 533 551 initToggles : function() { 534 552 // init postboxes 535 553 postboxes.add_postbox_toggles('nav-menus'); -
src/wp-includes/script-loader.php
530 530 did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array( 531 531 'noResultsFound' => _x('No results found.', 'search results'), 532 532 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ), 533 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.') 533 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), 534 'untitled' => _x('(no label)', 'missing menu item navigation label') 534 535 ) ); 535 536 536 537 $scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );