Changeset 32745
- Timestamp:
- 06/13/2015 02:02:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/nav-menu.js
r32690 r32745 21 21 options : { 22 22 menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxToDepth instead. 23 globalMaxDepth : 11 23 globalMaxDepth : 11, 24 sortableItems: '> *' 24 25 }, 25 26 … … 88 89 var result = $(); 89 90 this.each(function(){ 90 var t = $(this), depth = t.menuItemDepth(), next = t.next( );91 var t = $(this), depth = t.menuItemDepth(), next = t.next( '.menu-item' ); 91 92 while( next.length && next.menuItemDepth() > depth ) { 92 93 result = result.add( next ); 93 next = next.next( );94 next = next.next( '.menu-item' ); 94 95 } 95 96 }); … … 621 622 handle: '.menu-item-handle', 622 623 placeholder: 'sortable-placeholder', 624 items: api.options.sortableItems, 623 625 start: function(e, ui) { 624 626 var height, width, parent, children, tempHolder; … … 661 663 662 664 // Update the list of menu items. 663 tempHolder = ui.placeholder.next( );665 tempHolder = ui.placeholder.next( '.menu-item' ); 664 666 tempHolder.css( 'margin-top', helperHeight + 'px' ); // Set the margin to absorb the placeholder 665 667 ui.placeholder.detach(); // detach or jQuery UI will think the placeholder is a menu item … … 741 743 var depth; 742 744 743 prev = ui.placeholder.prev( );744 next = ui.placeholder.next( );745 prev = ui.placeholder.prev( '.menu-item' ); 746 next = ui.placeholder.next( '.menu-item' ); 745 747 746 748 // Make sure we don't select the moving item. 747 if( prev[0] == ui.item[0] ) prev = prev.prev( );748 if( next[0] == ui.item[0] ) next = next.next( );749 if( prev[0] == ui.item[0] ) prev = prev.prev( '.menu-item' ); 750 if( next[0] == ui.item[0] ) next = next.next( '.menu-item' ); 749 751 750 752 prevBottom = (prev.length) ? prev.offset().top + prev.height() : 0;
Note: See TracChangeset
for help on using the changeset viewer.