Menus: Don't display "Move" text without direction if there is only one menu item.

props kucrut for initial patch.
fixes #30765.

git-svn-id: https://develop.svn.wordpress.org/trunk@31320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-02-01 05:28:29 +00:00
parent 917af97d4f
commit 09d350b835

View File

@ -429,6 +429,8 @@ var wpNavMenu;
totalMenuItems = $('#menu-to-edit li').length, totalMenuItems = $('#menu-to-edit li').length,
hasSameDepthSibling = menuItem.nextAll( '.menu-item-depth-' + depth ).length; hasSameDepthSibling = menuItem.nextAll( '.menu-item-depth-' + depth ).length;
menuItem.find( '.field-move' ).toggle( totalMenuItems > 1 );
// Where can they move this menu item? // Where can they move this menu item?
if ( 0 !== position ) { if ( 0 !== position ) {
thisLink = menuItem.find( '.menus-move-up' ); thisLink = menuItem.find( '.menus-move-up' );
@ -1187,6 +1189,7 @@ var wpNavMenu;
$( '.drag-instructions' ).hide(); $( '.drag-instructions' ).hide();
ins.removeClass( 'menu-instructions-inactive' ); ins.removeClass( 'menu-instructions-inactive' );
} }
api.refreshAdvancedAccessibility();
}); });
}, },