Ticket #31336: 31336.2.diff
File 31336.2.diff, 14.2 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
45 45 overflow-x: hidden; 46 46 } 47 47 48 #customize- info {48 #customize-controls .customize-info { 49 49 border: none; 50 50 border-top: 1px solid #ddd; 51 border-bottom: 1px solid #ddd; 51 52 } 52 53 53 #customize- info .accordion-section-title {54 background -color: #fff;55 color: # 666666;54 #customize-controls .customize-info .accordion-section-title { 55 background: transparent !important; 56 color: #555 !important; 56 57 border-left: none; 57 58 border-right: none; 58 border-bottom: 1px solid #eeeeee; 59 border-bottom: none; 60 cursor: default; 59 61 } 60 62 61 #customize- info.open .accordion-section-title:after,62 #customize- info .accordion-section-title:hover:after,63 #customize- info .accordion-section-title:focus:after {64 color: # 555555;63 #customize-controls .customize-info.open .accordion-section-title:after, 64 #customize-controls .customize-info .accordion-section-title:hover:after, 65 #customize-controls .customize-info .accordion-section-title:focus:after { 66 color: #333; 65 67 } 66 68 67 #customize-info .preview-notice { 69 #customize-controls .customize-info .accordion-section-title:after { 70 display: none; 71 } 72 73 #customize-controls .customize-info .preview-notice { 68 74 font-size: 13px; 69 75 line-height: 24px; 70 76 } 71 77 72 #customize-info .theme-name { 78 #customize-controls .control-section .customize-section-title, 79 #customize-controls .customize-info .panel-title { 73 80 font-size: 20px; 74 81 font-weight: 200; 75 82 line-height: 24px; … … 76 83 display: block; 77 84 } 78 85 79 #customize-info .theme-screenshot { 80 width: 258px; 86 #customize-controls .customize-info .customize-help-toggle { 87 position: absolute; 88 top: 4px; 89 right: 1px; 90 padding: 10px 8px 10px 10px; 91 cursor: pointer; 81 92 } 82 93 83 #customize-info .theme-description { 84 margin-top: 1em; 85 color: #666666; 86 line-height: 20px; 94 #customize-controls .customize-info.open .customize-help-toggle { 95 color: #0073aa; 87 96 } 88 97 98 #customize-controls .customize-info .customize-panel-description { 99 display: none; 100 background: transparent; 101 padding: 0 12px 16px 12px; 102 } 103 89 104 #customize-theme-controls .control-section { 90 105 border: none; 91 106 } … … 96 111 border-bottom: 1px solid #eeeeee; 97 112 } 98 113 114 #customize-theme-controls .accordion-section-title:after { 115 content: "\f345"; 116 } 117 118 .rtl #customize-theme-controls .accordion-section-title:after { 119 content: "\f341"; 120 } 121 99 122 #customize-theme-controls .accordion-section-content { 100 color: #555 555;101 background: #fff;123 color: #555; 124 background: transparent; 102 125 } 103 126 104 #customize-info.open .accordion-section-title, 105 #customize-info .accordion-section-title:hover, 106 #customize-info .accordion-section-title:focus, 107 #customize-theme-controls .control-section:hover > .accordion-section-title, 108 #customize-theme-controls .control-section .accordion-section-title:hover, 109 #customize-theme-controls .control-section.open .accordion-section-title, 110 #customize-theme-controls .control-section .accordion-section-title:focus { 127 #customize-controls .control-section:hover > .accordion-section-title, 128 #customize-controls .control-section .accordion-section-title:hover, 129 #customize-controls .control-section.open .accordion-section-title, 130 #customize-controls .control-section .accordion-section-title:focus { 111 131 color: #222; 112 132 background: #f5f5f5; 113 133 } … … 126 146 color: #555; 127 147 } 128 148 129 #customize-info.open,130 149 #customize-theme-controls .control-section.open { 131 150 border-bottom: 1px solid #eeeeee; 132 151 } … … 140 159 border-bottom-color: #ddd; 141 160 } 142 161 143 #customize-theme-controls > ul, 162 #customize-theme-controls > ul { 163 margin: 0; 164 } 165 144 166 #customize-theme-controls .accordion-section-content { 145 167 margin: 0; 168 position: absolute; 169 left: 100%; 170 top: 0; 171 width: -webkit-calc(100% - 24px); 172 width: calc(100% - 24px); 173 padding: 12px; 146 174 } 147 175 176 h3.customize-section-title { 177 margin: -12px; 178 padding: 12px; 179 border-bottom: 1px solid #ddd; 180 background: #fff; 181 color: #555; 182 cursor: pointer; 183 } 184 185 h3.customize-section-title:before { 186 font: normal 20px/1 dashicons; 187 content: "\f341"; 188 -webkit-font-smoothing: antialiased; 189 -moz-osx-font-smoothing: grayscale; 190 position: relative; 191 top: 3px; 192 } 193 194 .rtl h3.customize-section-title:before { 195 content: "\f345"; 196 } 197 198 #customize-theme-controls .control-section .accordion-section-content > li.customize-control:nth-child(2) { 199 margin-top: 12px; 200 } 201 202 #customize-theme-controls { 203 position: relative; 204 left: 0; 205 transition: .18s left ease-in-out; 206 } 207 208 .section-open #customize-info, 209 .section-open #customize-theme-controls { 210 left: -100%; 211 } 212 213 .section-open .control-panel-back { 214 display: none; 215 } 216 148 217 .control-section.control-panel > .accordion-section-title { 149 218 padding-right: 54px; 150 219 } … … 183 252 left: 300px; 184 253 top: 0; 185 254 width: 300px; 186 border-top: 1px solid #ddd;187 255 -webkit-transition: left ease-in-out .18s; 188 256 transition: left ease-in-out .18s; 189 257 } … … 215 283 .control-panel-back { 216 284 display: block; 217 285 position: fixed; 218 top: 0;286 top: 46px; 219 287 z-index: 99; 220 288 left: -48px; 221 289 width: 45px; 222 height: 45px;290 height: 69px; 223 291 padding-right: 2px; 224 292 background: #eee; 225 293 border-right: 1px solid #ddd; … … 232 300 display: none; 233 301 } 234 302 303 .panel-meta.customize-info .accordion-section-title { 304 margin-left: 47px; 305 border-left: 1px solid #ddd; 306 } 307 235 308 .customize-controls-close:focus, 236 309 .customize-controls-close:hover, 237 310 .control-panel-back:focus, … … 258 331 font: normal 20px/1 dashicons; 259 332 content: "\f341"; 260 333 position: relative; 261 top: 7px;334 top: 17px; 262 335 left: 13px; 263 336 } 264 337 … … 316 389 transition: left ease-in-out .18s; 317 390 } 318 391 319 .control-section.control-panel .accordion-section-title .panel-title {320 font-size: 20px;321 font-weight: 200;322 line-height: 24px;323 display: block;324 border: none;325 }326 327 .control-section.control-panel .preview-notice {328 font-size: 13px;329 line-height: 24px;330 }331 332 392 p.customize-section-description { 333 393 font-style: normal; 394 margin-top: 22px; 395 margin-bottom: 0; 334 396 } 335 397 336 398 .customize-control { … … 337 399 width: 100%; 338 400 float: left; 339 401 clear: both; 340 margin-bottom: 8px;402 margin-bottom: 12px; 341 403 } 342 404 343 405 .customize-control select, -
src/wp-admin/css/customize-widgets.css
573 573 574 574 575 575 @media screen and (max-height: 700px) and (min-width: 981px) { 576 .customize-control {576 .customize-control-widget { 577 577 margin-bottom: 0; 578 578 } 579 579 .widget-top { -
src/wp-admin/customize.php
138 138 139 139 <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat --> 140 140 <div class="wp-full-overlay-sidebar-content" tabindex="-1"> 141 <div id="customize-info" class="accordion-section ">142 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0">141 <div id="customize-info" class="accordion-section customize-info"> 142 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>"> 143 143 <span class="preview-notice"><?php 144 echo sprintf( __( 'You are customizing %s' ), '<strong class=" theme-name site-title">' . get_bloginfo( 'name' ) . '</strong>' );144 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' ); 145 145 ?></span> 146 <span class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></span> 146 147 </div> 147 <div class=" accordion-section-content"><?php148 <div class="customize-panel-description"><?php 148 149 echo __( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' ); 149 150 ?></div> 150 151 </div> -
src/wp-admin/js/customize-controls.js
428 428 var section = this; 429 429 430 430 // Expand/Collapse accordion sections on click. 431 section.container.find( '.accordion-section-title ' ).on( 'click keydown', function( event ) {431 section.container.find( '.accordion-section-title, .customize-section-title' ).on( 'click keydown', function( event ) { 432 432 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 433 433 return; 434 434 } … … 481 481 * @param {Object} args 482 482 */ 483 483 onChangeExpanded: function ( expanded, args ) { 484 var section = this, 484 var position, scroll, section = this, 485 container = section.container.closest( '.accordion-container' ), 485 486 content = section.container.find( '.accordion-section-content' ), 487 overlay = section.container.closest( '.wp-full-overlay' ), 486 488 expand; 487 489 488 490 if ( expanded ) { … … 491 493 expand = args.completeCallback; 492 494 } else { 493 495 expand = function () { 494 content.stop().slideDown( args.duration, args.completeCallback );495 496 section.container.addClass( 'open' ); 497 overlay.addClass( 'section-open' ); 498 position = content.offset().top; 499 scroll = container.scrollTop(); 500 content.css( 'margin-top', ( 45 - position - scroll ) ); 496 501 }; 497 502 } 498 503 … … 515 520 516 521 } else { 517 522 section.container.removeClass( 'open' ); 518 content.slideUp( args.duration, args.completeCallback ); 523 overlay.removeClass( 'section-open' ); 524 content.css( 'margin-top', 'inherit' ); 525 container.scrollTop( 0 ); 519 526 } 520 527 } 521 528 }); … … 925 932 926 933 meta = panel.container.find( '.panel-meta:first' ); 927 934 928 meta.find( '> .accordion-section-title ' ).on( 'click keydown', function( event ) {935 meta.find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) { 929 936 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 930 937 return; 931 938 } … … 935 942 return; 936 943 } 937 944 938 var content = meta.find( '. accordion-section-content:first' );945 var content = meta.find( '.customize-panel-description:first' ); 939 946 if ( meta.hasClass( 'open' ) ) { 940 947 meta.toggleClass( 'open' ); 941 948 content.slideUp( panel.defaultExpandedArguments.duration ); … … 2286 2293 var parent, topFocus, 2287 2294 body = $( document.body ), 2288 2295 overlay = body.children( '.wp-full-overlay' ), 2289 title = $( '#customize-info . theme-name.site-title' ),2296 title = $( '#customize-info .panel-title.site-title' ), 2290 2297 closeBtn = $( '.customize-controls-close' ), 2291 2298 saveBtn = $( '#save' ); 2292 2299 … … 2301 2308 }); 2302 2309 2303 2310 // Expand/Collapse the main customizer customize info. 2304 $( ' #customize-info' ).find( '> .accordion-section-title' ).on( 'click keydown', function( event ) {2311 $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) { 2305 2312 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 2306 2313 return; 2307 2314 } 2308 2315 event.preventDefault(); // Keep this AFTER the key filter above 2309 2316 2310 var section = $( this ). parent(),2311 content = section.find( '. accordion-section-content:first' );2317 var section = $( this ).closest( '.accordion-section' ), 2318 content = section.find( '.customize-panel-description:first' ); 2312 2319 2313 2320 if ( section.hasClass( 'cannot-expand' ) ) { 2314 2321 return; -
src/wp-includes/class-wp-customize-panel.php
315 315 */ 316 316 protected function render_content() { 317 317 ?> 318 <li class="panel-meta accordion-section control-section<?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>">319 <div class="accordion-section-title" tabindex="0">318 <li class="panel-meta customize-info accordion-section <?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>"> 319 <div class="accordion-section-title"> 320 320 <span class="preview-notice"><?php 321 321 /* translators: %s is the site/panel title in the Customizer */ 322 322 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' ); 323 323 ?></span> 324 <span class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></span> 324 325 </div> 325 326 <?php if ( ! empty( $this->description ) ) : ?> 326 <div class=" accordion-section-contentdescription">327 <div class="description customize-panel-description"> 327 328 <?php echo $this->description; ?> 328 329 </div> 329 330 <?php endif; ?> -
src/wp-includes/class-wp-customize-section.php
305 305 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 306 306 <h3 class="accordion-section-title" tabindex="0"> 307 307 <?php echo esc_html( $this->title ); ?> 308 <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>308 <span class="screen-reader-text"><?php _e( 'Press return or enter to open' ); ?></span> 309 309 </h3> 310 310 <ul class="accordion-section-content"> 311 <?php if ( ! empty( $this->description ) ) : ?> 312 <li class="customize-section-description-container"> 311 <li class="customize-section-description-container"> 312 <h3 class="customize-section-title" tabindex="0"> 313 <?php echo esc_html( $this->title ); ?> 314 <span class="screen-reader-text"><?php _e( 'Press return or enter to close' ); ?></span> 315 </h3> 316 <?php if ( ! empty( $this->description ) ) : ?> 313 317 <p class="description customize-section-description"><?php echo $this->description; ?></p> 314 < /li>315 < ?php endif; ?>318 <?php endif; ?> 319 </li> 316 320 </ul> 317 321 </li> 318 322 <?php