Ticket #33229: 33229.2.patch
File 33229.2.patch, 6.2 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
41 41 border-bottom: 1px solid #ddd; 42 42 } 43 43 44 #customize-header-actions .secondary-actions {45 display: none;46 }47 48 44 #customize-controls .wp-full-overlay-sidebar-content { 49 45 overflow-y: auto; 50 46 overflow-x: hidden; … … 273 269 left: -100%; 274 270 } 275 271 276 .section-open .control-panel-back {277 display: none;278 }279 280 272 .accordion-sub-container.control-panel-content { 281 273 display: none; 282 274 position: absolute; … … 300 292 width: 100%; 301 293 } 302 294 303 .customize-overlay-close,304 295 .customize-controls-close { 305 296 display: block; 306 297 position: absolute; … … 322 313 box-sizing: content-box; 323 314 } 324 315 325 .customize-overlay-close {326 left: auto;327 right: 0;328 border-right: 0;329 border-left: 1px solid #ddd;330 }331 332 .control-panel-back {333 display: block;334 position: fixed;335 top: 0;336 z-index: 99;337 left: -48px;338 width: 45px;339 height: 45px;340 padding-right: 2px;341 background: #eee;342 border-right: 1px solid #ddd;343 cursor: pointer;344 -webkit-transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;345 transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;346 }347 348 316 .customize-panel-back, 349 317 .customize-section-back { 350 318 display: block; … … 367 335 height: 70px; 368 336 } 369 337 370 .ios .control-panel-back,371 338 .ios .customize-panel-back, 372 339 .ios .customize-section-back { 373 340 -webkit-transition: left 0s; 374 341 transition: left 0s; 375 342 } 376 343 377 .collapsed .control-panel-back,378 344 .ios .customize-panel-back { 379 345 display: none; 380 346 } … … 392 358 color: #555; 393 359 } 394 360 395 .customize-overlay-close:focus,396 .customize-overlay-close:hover,397 361 .customize-controls-close:focus, 398 362 .customize-controls-close:hover, 399 .control-panel-back:focus,400 .control-panel-back:hover,401 363 .customize-controls-preview-toggle:focus, 402 364 .customize-controls-preview-toggle:hover { 403 365 background: #ddd; … … 419 381 box-shadow: none; 420 382 } 421 383 422 .customize-overlay-close:before,423 384 .customize-controls-close:before { 424 385 font: normal 22px/45px dashicons; 425 386 content: "\f335"; … … 436 397 left: 13px; 437 398 } 438 399 439 .control-panel-back:before {440 font: normal 20px/45px dashicons;441 content: "\f341";442 position: relative;443 top: 1px;444 left: 13px;445 }446 447 400 .wp-full-overlay-sidebar .wp-full-overlay-header { 448 401 -webkit-transition: padding ease-in-out .18s; 449 402 transition: padding ease-in-out .18s; -
src/wp-admin/customize.php
123 123 <div class="wp-full-overlay expanded"> 124 124 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 125 125 <div id="customize-header-actions" class="wp-full-overlay-header"> 126 <div class="primary-actions"> 127 <?php 128 $save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); 129 submit_button( $save_text, 'primary save', 'save', false ); 130 ?> 131 <span class="spinner"></span> 132 <a class="customize-controls-preview-toggle" href="#"> 133 <span class="controls"><?php _e( 'Customize' ); ?></span> 134 <span class="preview"><?php _e( 'Preview' ); ?></span> 135 </a> 136 <a class="customize-controls-close" href="<?php echo esc_url( $return ); ?>"> 137 <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span> 138 </a> 139 <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span> 140 </div> 141 <div class="secondary-actions"> 142 <button type="button" class="customize-overlay-close"> 143 <span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span> 144 </button> 145 </div> 126 <?php 127 $save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); 128 submit_button( $save_text, 'primary save', 'save', false ); 129 ?> 130 <span class="spinner"></span> 131 <a class="customize-controls-preview-toggle" href="#"> 132 <span class="controls"><?php _e( 'Customize' ); ?></span> 133 <span class="preview"><?php _e( 'Preview' ); ?></span> 134 </a> 135 <a class="customize-controls-close" href="<?php echo esc_url( $return ); ?>"> 136 <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span> 137 </a> 146 138 </div> 147 139 148 140 <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 --> -
src/wp-admin/js/customize-controls.js
3387 3387 event.preventDefault(); 3388 3388 }); 3389 3389 3390 // Go back to the top-level Customizer accordion.3391 $( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( event ) {3392 if ( api.utils.isKeydownButNotEnterEvent( event ) ) {3393 return;3394 }3395 3396 event.preventDefault(); // Keep this AFTER the key filter above3397 api.panel.each( function ( panel ) {3398 panel.collapse();3399 });3400 });3401 3402 3390 closeBtn.keydown( function( event ) { 3403 3391 if ( 9 === event.which ) // tab 3404 3392 return; -
src/wp-admin/js/customize-widgets.js
177 177 // If the available widgets panel is open and the customize controls are 178 178 // interacted with (i.e. available widgets panel is blurred) then close the 179 179 // available widgets panel. Also close on back button click. 180 $( '#customize-controls, .customize-overlay-close,#available-widgets .customize-section-title' ).on( 'click keydown', function( e ) {180 $( '#customize-controls, #available-widgets .customize-section-title' ).on( 'click keydown', function( e ) { 181 181 var isAddNewBtn = $( e.target ).is( '.add-new-widget, .add-new-widget *' ); 182 182 if ( $( 'body' ).hasClass( 'adding-widget' ) && ! isAddNewBtn ) { 183 183 self.close();