Ticket #23449: 23449.22.diff
| File 23449.22.diff, 8.5 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/template.php
1000 1000 <ul class="outer-border"> 1001 1001 <?php 1002 1002 $i = 0; 1003 $first_open = false; 1003 1004 do { 1004 1005 if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) ) 1005 1006 break; … … 1011 1012 continue; 1012 1013 $i++; 1013 1014 $hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : ''; 1015 1016 $open_class = ''; 1017 if ( ! $first_open && empty( $hidden_class ) ) { 1018 $first_open = true; 1019 $open_class = 'open'; 1020 } 1014 1021 ?> 1015 <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">1022 <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>"> 1016 1023 <h3 class="accordion-section-title hndle" tabindex="0" title="<?php echo esc_attr( $box['title'] ); ?>"><?php echo esc_html( $box['title'] ); ?></h3> 1017 1024 <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>"> 1018 1025 <div class="inside"> -
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">94 <div id="customize-info" class="accordion-section <?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">93 <div class="wp-full-overlay-sidebar-content accordion-container" tabindex="-1"> 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 97 97 /* translators: %s is the theme name in the Customize/Live Preview pane */ … … 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 // Re fresh selected accordion option when screen options are toggled14 // Re-initialize accordion when screen options are toggled 16 15 $( '.hide-postbox-tog' ).click( function () { 17 16 accordionInit(); 18 17 }); … … 22 21 var accordionOptions = $( '.accordion-container li.accordion-section' ), 23 22 sectionContent = $( '.accordion-section-content' ); 24 23 25 // Rounded corners26 function accordionCorners () {24 function accordionInit () { 25 // Rounded corners 27 26 accordionOptions.removeClass( 'top bottom' ); 28 27 accordionOptions.filter( ':visible' ).first().addClass( 'top' ); 29 accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass('bottom'); 30 }; 31 32 function accordionInit () { 33 accordionSwitch( accordionOptions.filter( ':visible' ).first() ); 34 accordionCorners(); 28 accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass( 'bottom' ); 35 29 } 36 30 37 31 function accordionSwitch ( el ) { 38 32 var section = el.closest( '.accordion-section' ), 39 siblings = section.parent().find( '.open' ),40 content = section.find( sectionContent );33 siblings = section.closest( '.accordion-container' ).find( '.open' ), 34 content = section.find( sectionContent ); 41 35 42 36 if ( section.hasClass( 'cannot-expand' ) ) 43 37 return; 44 38 45 siblings.removeClass( 'open' ); 46 siblings.find( sectionContent ).show().slideUp( 150 ); 47 content.toggle( section.hasClass( 'open' ) ).slideToggle( 150 ); 48 section.toggleClass( 'open' ); 39 if ( section.hasClass( 'open' ) ) { 40 section.toggleClass( 'open' ); 41 content.toggle( true ).slideToggle( 150 ); 42 } else { 43 siblings.removeClass( 'open' ); 44 siblings.find( sectionContent ).show().slideUp( 150 ); 45 content.toggle( false ).slideToggle( 150 ); 46 section.toggleClass( 'open' ); 47 } 48 49 accordionInit(); 49 50 } 50 51 51 // Show the first accordion option by default52 // Initialize the accordion (currently just corner fixes) 52 53 accordionInit(); 53 54 54 55 })(jQuery); -
wp-admin/css/wp-admin.css
9029 9029 9030 9030 .control-section .accordion-section-title { 9031 9031 padding: 10px 20px; 9032 color: #464646; 9032 9033 font-size: 15px; 9033 9034 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; 9034 9035 font-weight: normal; … … 9045 9046 top: 15px; 9046 9047 } 9047 9048 9048 .control-section .accordion-section-title:hover:after,9049 .control-section .accordion-section-title:focus:after {9050 border-color: #eee transparent;9051 }9052 9053 9049 .js .control-section:hover .accordion-section-title, 9054 9050 .js .control-section .accordion-section-title:hover, 9055 9051 .js .control-section.open .accordion-section-title, 9056 9052 .js .control-section .accordion-section-title:focus { 9057 color: #fff; 9058 text-shadow: 0 -1px 0 #333; 9059 background: #808080; 9060 background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080)); 9061 background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080); 9062 background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080); 9063 background-image: -o-linear-gradient(bottom, #6d6d6d, #808080); 9064 background-image: linear-gradient(to top, #6d6d6d, #808080); 9065 border-left: 1px solid #808080; 9066 border-right: 1px solid #808080; 9053 color: #000; 9054 background: #f9f9f9; 9055 background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); 9056 background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); 9057 background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); 9058 background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); 9059 background-image: linear-gradient(to top, #ececec, #f9f9f9); 9067 9060 } 9068 9061 9069 .js .control-section.accordion-section:hover,9070 .control-section.accordion-section.open {9071 border-top-color: #808080;9072 }9073 9074 9062 .control-section.open .accordion-section-title { 9075 border-bottom: 1px solid # 6d6d6d;9063 border-bottom: 1px solid #dfdfdf; 9076 9064 } 9077 9065 9078 9066 /* =Media Queries -
wp-admin/css/customize-controls.css
121 121 height: 100%; 122 122 } 123 123 124 #customize-theme-controls .accordion-section-title:hover:after, 125 #customize-theme-controls .accordion-section-title:focus:after { 126 border-color: #eee transparent; 127 } 128 129 #customize-theme-controls .control-section:hover .accordion-section-title, 130 #customize-theme-controls .control-section .accordion-section-title:hover, 131 #customize-theme-controls .control-section.open .accordion-section-title, 132 #customize-theme-controls .control-section .accordion-section-title:focus { 133 color: #fff; 134 text-shadow: 0 -1px 0 #333; 135 background: #808080; 136 background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080)); 137 background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080); 138 background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080); 139 background-image: -o-linear-gradient(bottom, #6d6d6d, #808080); 140 background-image: linear-gradient(to top, #6d6d6d, #808080); 141 border-left: 1px solid #808080; 142 border-right: 1px solid #808080; 143 } 144 145 #customize-theme-controls .control-section.accordion-section:hover, 146 #customize-theme-controls .control-section.accordion-section.open { 147 border-top-color: #808080; 148 } 149 150 #customize-theme-controls .control-section.open .accordion-section-title { 151 border-bottom: 1px solid #6d6d6d; 152 } 153 124 154 /* 125 155 * Style for custom settings 126 156 */
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)