Changeset 24734
- Timestamp:
- 07/18/2013 05:42:53 PM (11 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/customize-controls.css
r23417 r24734 120 120 width: 100%; 121 121 height: 100%; 122 } 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; 122 152 } 123 153 -
trunk/wp-admin/css/wp-admin.css
r24732 r24734 9048 9048 .control-section .accordion-section-title { 9049 9049 padding: 10px 20px; 9050 color: #464646; 9050 9051 font-size: 15px; 9051 9052 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; … … 9064 9065 } 9065 9066 9066 .control-section .accordion-section-title:hover:after,9067 .control-section .accordion-section-title:focus:after {9068 border-color: #eee transparent;9069 }9070 9071 9067 .js .control-section:hover .accordion-section-title, 9072 9068 .js .control-section .accordion-section-title:hover, 9073 9069 .js .control-section.open .accordion-section-title, 9074 9070 .js .control-section .accordion-section-title:focus { 9075 color: #fff; 9076 text-shadow: 0 -1px 0 #333; 9077 background: #808080; 9078 background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080)); 9079 background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080); 9080 background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080); 9081 background-image: -o-linear-gradient(bottom, #6d6d6d, #808080); 9082 background-image: linear-gradient(to top, #6d6d6d, #808080); 9083 border-left: 1px solid #808080; 9084 border-right: 1px solid #808080; 9085 } 9086 9087 .js .control-section.accordion-section:hover, 9088 .control-section.accordion-section.open { 9089 border-top-color: #808080; 9071 color: #000; 9072 background: #f9f9f9; 9073 background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); 9074 background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); 9075 background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); 9076 background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); 9077 background-image: linear-gradient(to top, #ececec, #f9f9f9); 9090 9078 } 9091 9079 9092 9080 .control-section.open .accordion-section-title { 9093 border-bottom: 1px solid # 6d6d6d;9081 border-bottom: 1px solid #dfdfdf; 9094 9082 } 9095 9083 -
trunk/wp-admin/customize.php
r23417 r24734 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() ) : … … 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 … … 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 ) -
trunk/wp-admin/includes/template.php
r24680 r24734 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] ) ) … … 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 ); ?>"> -
trunk/wp-admin/js/accordion.js
r24680 r24734 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(); … … 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 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
Note: See TracChangeset
for help on using the changeset viewer.