diff --git src/wp-admin/css/customize-nav-menus.css src/wp-admin/css/customize-nav-menus.css
index a63df15..6fe558d 100644
|
|
|
|
| 301 | 301 | text-decoration: none !important; |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | | #accordion-panel-nav_menus .field-link-target, |
| 305 | | #accordion-panel-nav_menus .field-title-attribute, |
| 306 | | #accordion-panel-nav_menus .field-css-classes, |
| 307 | | #accordion-panel-nav_menus .field-xfn, |
| 308 | | #accordion-panel-nav_menus .field-description { |
| | 304 | .control-section-nav_menu .field-link-target, |
| | 305 | .control-section-nav_menu .field-title-attribute, |
| | 306 | .control-section-nav_menu .field-css-classes, |
| | 307 | .control-section-nav_menu .field-xfn, |
| | 308 | .control-section-nav_menu .field-description { |
| 309 | 309 | display: none; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | | #accordion-panel-nav_menus.field-link-target-active .field-link-target, |
| 313 | | #accordion-panel-nav_menus.field-title-attribute-active .field-title-attribute, |
| 314 | | #accordion-panel-nav_menus.field-css-classes-active .field-css-classes, |
| 315 | | #accordion-panel-nav_menus.field-xfn-active .field-xfn, |
| 316 | | #accordion-panel-nav_menus.field-description-active .field-description { |
| | 312 | .control-section-nav_menu.field-link-target-active .field-link-target, |
| | 313 | .control-section-nav_menu.field-title-attribute-active .field-title-attribute, |
| | 314 | .control-section-nav_menu.field-css-classes-active .field-css-classes, |
| | 315 | .control-section-nav_menu.field-xfn-active .field-xfn, |
| | 316 | .control-section-nav_menu.field-description-active .field-description { |
| 317 | 317 | display: block; |
| 318 | 318 | } |
| 319 | 319 | |
diff --git src/wp-admin/js/customize-nav-menus.js src/wp-admin/js/customize-nav-menus.js
index be3fba1..7d70163 100644
|
|
|
|
| 790 | 790 | */ |
| 791 | 791 | ready: function() { |
| 792 | 792 | var panel = this; |
| 793 | | this.container.find( '.hide-column-tog' ).click( function() { |
| 794 | | var $t = $( this ), column = $t.val(); |
| 795 | | if ( $t.prop( 'checked' ) ) { |
| 796 | | panel.checked( column ); |
| 797 | | } else { |
| 798 | | panel.unchecked( column ); |
| 799 | | } |
| 800 | | |
| | 793 | panel.container.find( '.hide-column-tog' ).click( function() { |
| 801 | 794 | panel.saveManageColumnsState(); |
| 802 | 795 | }); |
| 803 | | this.container.find( '.hide-column-tog' ).each( function() { |
| 804 | | var $t = $( this ), column = $t.val(); |
| 805 | | if ( $t.prop( 'checked' ) ) { |
| 806 | | panel.checked( column ); |
| 807 | | } else { |
| 808 | | panel.unchecked( column ); |
| 809 | | } |
| 810 | | }); |
| 811 | 796 | }, |
| 812 | 797 | |
| | 798 | /** |
| | 799 | * Save hidden column states. |
| | 800 | * |
| | 801 | * @since 4.3.0 |
| | 802 | * @private |
| | 803 | * |
| | 804 | * @returns {void} |
| | 805 | */ |
| 813 | 806 | saveManageColumnsState: _.debounce( function() { |
| 814 | 807 | var panel = this; |
| 815 | 808 | if ( panel._updateHiddenColumnsRequest ) { |
| … |
… |
|
| 826 | 819 | } ); |
| 827 | 820 | }, 2000 ), |
| 828 | 821 | |
| 829 | | checked: function( column ) { |
| 830 | | this.container.addClass( 'field-' + column + '-active' ); |
| 831 | | }, |
| | 822 | /** |
| | 823 | * @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers. |
| | 824 | */ |
| | 825 | checked: function() {}, |
| 832 | 826 | |
| 833 | | unchecked: function( column ) { |
| 834 | | this.container.removeClass( 'field-' + column + '-active' ); |
| 835 | | }, |
| | 827 | /** |
| | 828 | * @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers. |
| | 829 | */ |
| | 830 | unchecked: function() {}, |
| 836 | 831 | |
| | 832 | /** |
| | 833 | * Get hidden fields. |
| | 834 | * |
| | 835 | * @since 4.3.0 |
| | 836 | * @private |
| | 837 | * |
| | 838 | * @returns {Array} Fields (columns) that are hidden. |
| | 839 | */ |
| 837 | 840 | hidden: function() { |
| 838 | 841 | return $( '.hide-column-tog' ).not( ':checked' ).map( function() { |
| 839 | 842 | var id = this.id; |
| … |
… |
|
| 871 | 874 | * Ready. |
| 872 | 875 | */ |
| 873 | 876 | ready: function() { |
| 874 | | var section = this; |
| | 877 | var section = this, fieldActiveToggles, handleFieldActiveToggle; |
| 875 | 878 | |
| 876 | 879 | if ( 'undefined' === typeof section.params.menu_id ) { |
| 877 | 880 | throw new Error( 'params.menu_id was not defined' ); |
| … |
… |
|
| 923 | 926 | section.container.find( '.menu-item.move-left-disabled .menus-move-left' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); |
| 924 | 927 | section.container.find( '.menu-item.move-right-disabled .menus-move-right' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); |
| 925 | 928 | } ); |
| | 929 | |
| | 930 | /** |
| | 931 | * Update the active field class for the content container for a given checkbox toggle. |
| | 932 | * |
| | 933 | * @this {jQuery} |
| | 934 | * @returns {void} |
| | 935 | */ |
| | 936 | handleFieldActiveToggle = function() { |
| | 937 | var className = 'field-' + $( this ).val() + '-active'; |
| | 938 | section.contentContainer.toggleClass( className, $( this ).prop( 'checked' ) ); |
| | 939 | }; |
| | 940 | fieldActiveToggles = api.panel( 'nav_menus' ).contentContainer.find( '.metabox-prefs:first' ).find( '.hide-column-tog' ); |
| | 941 | fieldActiveToggles.each( handleFieldActiveToggle ); |
| | 942 | fieldActiveToggles.on( 'click', handleFieldActiveToggle ); |
| 926 | 943 | }, |
| 927 | 944 | |
| 928 | 945 | populateControls: function() { |