Make WordPress Core

Changeset 29610


Ignore:
Timestamp:
08/25/2014 11:04:43 PM (10 years ago)
Author:
helen
Message:

Customizer panels: use a single back button for all panels.

This also ensures the back button is visible on iOS devices.

props celloexpressions.
fixes #29135.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r29608 r29610  
    253253    content: "\f341";
    254254    position: relative;
    255     top: 13px;
     255    top: 7px;
    256256    left: 13px;
    257257}
     
    261261}
    262262
    263 .current-panel .control-panel-back {
     263.in-sub-panel .control-panel-back {
    264264    left: 0;
    265265}
  • trunk/src/wp-admin/customize.php

    r29488 r29610  
    122122                <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span>
    123123            </a>
     124            <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
    124125        </div>
    125126
  • trunk/src/wp-admin/js/accordion.js

    r29042 r29610  
    4848
    4949        // Go back to the top-level Customizer accordion.
    50         $( '.accordion-container' ).on( 'click keydown', '.control-panel-back', function( e ) {
     50        $( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( e ) {
    5151            if ( e.type === 'keydown' && 13 !== e.which ) { // "return" key
    5252                return;
     
    5555            e.preventDefault(); // Keep this AFTER the key filter above
    5656
    57             panelSwitch( $( this ) );
     57            panelSwitch( $( '.current-panel' ) );
    5858        });
    5959    });
     
    109109            siblings = container.find( '.open' ),
    110110            topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ),
    111             backBtn = section.find( '.control-panel-back' ),
     111            backBtn = overlay.find( '.control-panel-back' ),
    112112            panelTitle = section.find( '.accordion-section-title' ).first(),
    113113            content = section.find( '.control-panel-content' );
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r29487 r29610  
    175175                <span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
    176176            </h3>
    177             <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
    178177            <ul class="accordion-sub-container control-panel-content">
    179178                <li class="accordion-section control-section<?php if ( empty( $this->description ) ) echo ' cannot-expand'; ?>">
Note: See TracChangeset for help on using the changeset viewer.