WordPress.org

Make WordPress Core

Changeset 33599


Ignore:
Timestamp:
08/09/2015 06:59:34 PM (5 years ago)
Author:
ocean90
Message:

Customizer: Remove obsolete .control-panel-back and .customize-overlay-close buttons.

props afercia, ocean90.
see #31336.
fixes #33229.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r33510 r33599  
    4040#customize-header-actions {
    4141    border-bottom: 1px solid #ddd;
    42 }
    43 
    44 #customize-header-actions .secondary-actions {
    45     display: none;
    4642}
    4743
     
    274270}
    275271
    276 .section-open .control-panel-back {
    277     display: none;
    278 }
    279 
    280272.accordion-sub-container.control-panel-content {
    281273    display: none;
     
    301293}
    302294
    303 .customize-overlay-close,
    304295.customize-controls-close {
    305296    display: block;
     
    323314}
    324315
    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 
    348316.customize-panel-back,
    349317.customize-section-back {
     
    368336}
    369337
    370 .ios .control-panel-back,
    371338.ios .customize-panel-back,
    372339.ios .customize-section-back {
     
    375342}
    376343
    377 .collapsed .control-panel-back,
    378344.ios .customize-panel-back {
    379345    display: none;
     
    393359}
    394360
    395 .customize-overlay-close:focus,
    396 .customize-overlay-close:hover,
    397361.customize-controls-close:focus,
    398362.customize-controls-close:hover,
    399 .control-panel-back:focus,
    400 .control-panel-back:hover,
    401363.customize-controls-preview-toggle:focus,
    402364.customize-controls-preview-toggle:hover {
     
    420382}
    421383
    422 .customize-overlay-close:before,
    423384.customize-controls-close:before {
    424385    font: normal 22px/45px dashicons;
     
    434395    content: "\f341";
    435396    position: relative;
    436     left: 13px;
    437 }
    438 
    439 .control-panel-back:before {
    440     font: normal 20px/45px dashicons;
    441     content: "\f341";
    442     position: relative;
    443     top: 1px;
    444397    left: 13px;
    445398}
  • trunk/src/wp-admin/customize.php

    r33492 r33599  
    124124    <form id="customize-controls" class="wrap wp-full-overlay-sidebar">
    125125        <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 &amp; Publish' ) : __( 'Save &amp; 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 &amp; Publish' ) : __( 'Save &amp; 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>
    146138        </div>
    147139
  • trunk/src/wp-admin/js/customize-controls.js

    r33596 r33599  
    33893389        });
    33903390
    3391         // Go back to the top-level Customizer accordion.
    3392         $( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( event ) {
    3393             if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    3394                 return;
    3395             }
    3396 
    3397             event.preventDefault(); // Keep this AFTER the key filter above
    3398             api.panel.each( function ( panel ) {
    3399                 panel.collapse();
    3400             });
    3401         });
    3402 
    34033391        closeBtn.keydown( function( event ) {
    34043392            if ( 9 === event.which ) // tab
  • trunk/src/wp-admin/js/customize-widgets.js

    r33596 r33599  
    178178            // interacted with (i.e. available widgets panel is blurred) then close the
    179179            // 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 ) {
    181181                var isAddNewBtn = $( e.target ).is( '.add-new-widget, .add-new-widget *' );
    182182                if ( $( 'body' ).hasClass( 'adding-widget' ) && ! isAddNewBtn ) {
Note: See TracChangeset for help on using the changeset viewer.