Customize: Mark newly-added page/post stubs as added (with checkmark) when they are inserted into the list of available items.
Props ryankienstra, celloexpressions. See #34923. Fixes #38499. Built from https://develop.svn.wordpress.org/trunk@39002 git-svn-id: http://core.svn.wordpress.org/trunk@38944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce81b7a849
commit
d71afc0d9a
|
@ -577,7 +577,7 @@
|
|||
post_type: itemObject
|
||||
} );
|
||||
promise.done( function( data ) {
|
||||
var availableItem, $content, itemTemplate;
|
||||
var availableItem, $content, itemElement;
|
||||
availableItem = new api.Menus.AvailableItemModel( {
|
||||
'id': 'post-' + data.post_id, // Used for available menu item Backbone models.
|
||||
'title': itemName.val(),
|
||||
|
@ -594,8 +594,9 @@
|
|||
// Add the new item to the list of available items.
|
||||
api.Menus.availableMenuItemsPanel.collection.add( availableItem );
|
||||
$content = container.find( '.available-menu-items-list' );
|
||||
itemTemplate = wp.template( 'available-menu-item' );
|
||||
$content.prepend( itemTemplate( availableItem.attributes ) );
|
||||
itemElement = $( wp.template( 'available-menu-item' )( availableItem.attributes ) );
|
||||
itemElement.find( '.menu-item-handle:first' ).addClass( 'item-added' );
|
||||
$content.prepend( itemElement );
|
||||
$content.scrollTop();
|
||||
|
||||
// Reset the create content form.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta1-39001';
|
||||
$wp_version = '4.7-beta1-39002';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue