Ticket #23449: 23449.21.diff
File 23449.21.diff, 8.3 KB (added by , 11 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 closable<?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 14 // Refresh selected accordion option when screen options are toggled … … 26 25 function accordionCorners () { 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 } ;28 accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass( 'bottom' ); 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 = section.closest( '.accordion-container' ).find( '.open' ), 39 content = section.find( sectionContent ); 41 40 42 41 if ( section.hasClass( 'cannot-expand' ) ) 43 42 return; 44 43 45 siblings.removeClass( 'open' ); 46 siblings.find( sectionContent ).show().slideUp( 150 ); 47 content.toggle( section.hasClass( 'open' ) ).slideToggle( 150 ); 48 section.toggleClass( 'open' ); 44 if ( section.hasClass( 'open' ) && ! section.hasClass( 'closable' ) ) { 45 return; 46 } else if ( section.hasClass( 'open' ) && section.hasClass( 'closable' ) ) { 47 section.toggleClass( 'open' ); 48 content.toggle( true ).slideToggle( 150 ); 49 } else { 50 siblings.removeClass( 'open' ); 51 siblings.find( sectionContent ).show().slideUp( 150 ); 52 content.toggle( false ).slideToggle( 150 ); 53 section.toggleClass( 'open' ); 54 } 55 56 accordionCorners(); 49 57 } 50 58 51 59 // Show the first accordion option by default -
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; … … 9029 9033 9030 9034 .control-section .accordion-section-title { 9031 9035 padding: 10px 20px; 9036 color: #464646; 9032 9037 font-size: 15px; 9033 9038 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; 9034 9039 font-weight: normal; … … 9045 9050 top: 15px; 9046 9051 } 9047 9052 9048 .control-section .accordion-section-title:hover:after,9049 .control-section .accordion-section-title:focus:after {9050 border-color: #eee transparent;9051 }9052 9053 9053 .js .control-section:hover .accordion-section-title, 9054 9054 .js .control-section .accordion-section-title:hover, 9055 9055 .js .control-section.open .accordion-section-title, 9056 9056 .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; 9057 color: #000; 9058 background: #f9f9f9; 9059 background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); 9060 background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); 9061 background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); 9062 background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); 9063 background-image: linear-gradient(to top, #ececec, #f9f9f9); 9067 9064 } 9068 9065 9069 .js .control-section.accordion-section:hover,9070 .control-section.accordion-section.open {9071 border-top-color: #808080;9072 }9073 9074 9066 .control-section.open .accordion-section-title { 9075 border-bottom: 1px solid # 6d6d6d;9067 border-bottom: 1px solid #dfdfdf; 9076 9068 } 9077 9069 9078 9070 /* =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 */