Make WordPress Core

Ticket #13247: 13247.item.selection.tweaks.1.patch

File 13247.item.selection.tweaks.1.patch, 1.0 KB (added by koopersmith, 16 years ago)
  • wp-admin/js/nav-menu.dev.js

     
    349349                                        // Set us to be the ajax target
    350350                                        targetList = target.children('.menu-item-transport');
    351351                                        // Get all checked elements and assemble selected items.
    352                                         items = menuItems.filter('.selected-menu-item').children().not( ui.helper ).clone();
     352                                        items = li.parents('.tabs-panel').find('.selected-menu-item').children().not( ui.helper ).clone();
    353353                                        ui.helper.children('.additional-menu-items').append( items );
    354354                                        // This class tells the sortables to treat it as a new item.
    355355                                        ui.helper.addClass('new-menu-item');
     
    372372                                stop: function(e, ui) {
    373373                                        // Reset the targetList and unselect the menu items
    374374                                        targetList = menuList;
    375                                         menuItems.filter('.selected-menu-item').deselectItem();
     375                                        $(e.target).parents('.tabs-panel').find('.selected-menu-item').deselectItem();
    376376                                }
    377377                        });
    378378                },