~canonical-sysadmins/wordpress/4.9.1

« back to all changes in this revision

Viewing changes to wp-admin/js/customize-nav-menus.js

  • Committer: Barry Price
  • Date: 2017-06-09 02:09:58 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: barry.price@canonical.com-20170609020958-838whhwt2196f2vk
Merge WP4.8 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
665
665
 
666
666
                // Opens the panel.
667
667
                open: function( menuControl ) {
 
668
                        var panel = this, close;
 
669
 
668
670
                        this.currentMenuControl = menuControl;
669
671
 
670
672
                        this.itemSectionHeight();
671
673
 
672
674
                        $( 'body' ).addClass( 'adding-menu-items' );
673
675
 
 
676
                        close = function() {
 
677
                                panel.close();
 
678
                                $( this ).off( 'click', close );
 
679
                        };
 
680
                        $( '#customize-preview' ).on( 'click', close );
 
681
 
674
682
                        // Collapse all controls.
675
683
                        _( this.currentMenuControl.getMenuItemControls() ).each( function( control ) {
676
684
                                control.collapseForm();