Changeset 38492
- Timestamp:
- 09/01/2016 05:54:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r38464 r38492 126 126 params.completeCallback = focus; 127 127 } 128 129 api.state( 'paneVisible' ).set( true ); 128 130 if ( construct.expand ) { 129 131 construct.expand( params ); … … 442 444 } 443 445 446 api.state( 'paneVisible' ).set( true ); 444 447 params.completeCallback = function() { 445 448 if ( previousCompleteCallback ) { … … 3913 3916 saved = state.create( 'saved' ), 3914 3917 activated = state.create( 'activated' ), 3915 processing = state.create( 'processing' ); 3918 processing = state.create( 'processing' ), 3919 paneVisible = state.create( 'paneVisible' ); 3916 3920 3917 3921 state.bind( 'change', function() { … … 3934 3938 activated( api.settings.theme.active ); 3935 3939 processing( 0 ); 3940 paneVisible( true ); 3936 3941 3937 3942 api.bind( 'change', function() { … … 3975 3980 3976 3981 $( '.collapse-sidebar' ).on( 'click', function() { 3977 if ( 'true' === $( this ).attr( 'aria-expanded' ) ) { 3978 $( this ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar }); 3982 api.state( 'paneVisible' ).set( ! api.state( 'paneVisible' ).get() ); 3983 }); 3984 3985 api.state( 'paneVisible' ).bind( function( paneVisible ) { 3986 overlay.toggleClass( 'expanded', paneVisible ); 3987 overlay.toggleClass( 'collapsed', ! paneVisible ); 3988 3989 if ( ! paneVisible ) { 3990 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar }); 3979 3991 } else { 3980 $( this ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar }); 3981 } 3982 3983 overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); 3992 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar }); 3993 } 3984 3994 }); 3985 3995
Note: See TracChangeset
for help on using the changeset viewer.