Ticket #23449: 23449.17.diff
File 23449.17.diff, 3.0 KB (added by , 11 years ago) |
---|
-
wp-admin/css/wp-admin.css
8997 8997 cursor: pointer; 8998 8998 } 8999 8999 9000 .js .open .accordion-section-title { 9001 cursor: default; 9002 } 9003 9000 9004 .js .accordion-section-title:after { 9001 9005 content: ''; 9002 9006 width: 0; -
wp-admin/customize.php
46 46 wp_user_settings(); 47 47 _wp_admin_html_begin(); 48 48 49 $body_class = 'wp-core-ui ';49 $body_class = 'wp-core-ui js'; 50 50 51 51 if ( wp_is_mobile() ) : 52 52 $body_class .= ' mobile'; … … 90 90 $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); 91 91 ?> 92 92 93 <div class="wp-full-overlay-sidebar-content " tabindex="-1">93 <div class="wp-full-overlay-sidebar-content accordion-container" tabindex="-1"> 94 94 <div id="customize-info" class="accordion-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>"> 95 95 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0"> 96 96 <span class="preview-notice"><?php … … 111 111 <?php endif; ?> 112 112 </div> 113 113 114 <div id="customize-theme-controls" class="accordion-container"><ul>114 <div id="customize-theme-controls"><ul> 115 115 <?php 116 116 foreach ( $wp_customize->sections() as $section ) 117 117 $section->maybe_render(); -
wp-admin/js/accordion.js
9 9 e.preventDefault(); // Keep this AFTER the key filter above 10 10 11 11 accordionSwitch( $( this ) ); 12 accordionCorners();13 12 }); 14 13 15 14 // Refresh selected accordion option when screen options are toggled … … 27 26 accordionOptions.removeClass( 'top bottom' ); 28 27 accordionOptions.filter( ':visible' ).first().addClass( 'top' ); 29 28 accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass('bottom'); 30 } ;29 } 31 30 32 31 function accordionInit () { 33 32 accordionSwitch( accordionOptions.filter( ':visible' ).first() ); … … 36 35 37 36 function accordionSwitch ( el ) { 38 37 var section = el.closest( '.accordion-section' ), 39 siblings = section.parent().find( '.open' ),40 38 siblings = $( '.accordion-container' ).find( '.open' ), 39 content = section.find( sectionContent ); 41 40 42 if ( section.hasClass( 'cannot-expand' ) )41 if ( section.hasClass( 'cannot-expand' ) || section.hasClass( 'open' ) ) 43 42 return; 44 43 45 44 siblings.removeClass( 'open' ); 46 45 siblings.find( sectionContent ).show().slideUp( 150 ); 47 46 content.toggle( section.hasClass( 'open' ) ).slideToggle( 150 ); 48 47 section.toggleClass( 'open' ); 48 49 accordionCorners(); 49 50 } 50 51 51 52 // Show the first accordion option by default