Changeset 39002
- Timestamp:
- 10/29/2016 05:05:33 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-nav-menus.js
r38906 r39002 578 578 } ); 579 579 promise.done( function( data ) { 580 var availableItem, $content, item Template;580 var availableItem, $content, itemElement; 581 581 availableItem = new api.Menus.AvailableItemModel( { 582 582 'id': 'post-' + data.post_id, // Used for available menu item Backbone models. … … 595 595 api.Menus.availableMenuItemsPanel.collection.add( availableItem ); 596 596 $content = container.find( '.available-menu-items-list' ); 597 itemTemplate = wp.template( 'available-menu-item' ); 598 $content.prepend( itemTemplate( availableItem.attributes ) ); 597 itemElement = $( wp.template( 'available-menu-item' )( availableItem.attributes ) ); 598 itemElement.find( '.menu-item-handle:first' ).addClass( 'item-added' ); 599 $content.prepend( itemElement ); 599 600 $content.scrollTop(); 600 601
Note: See TracChangeset
for help on using the changeset viewer.