Theme Switcher: Use the global panel back button instead of adding a new one.

This ensures the back button is visible on iOS devices. Same as in [29610].

see #31794.
Built from https://develop.svn.wordpress.org/trunk@31918


git-svn-id: http://core.svn.wordpress.org/trunk@31897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-03-28 22:09:26 +00:00
parent 7875dd4853
commit 96b88a391b
8 changed files with 18 additions and 26 deletions

View File

@ -945,21 +945,16 @@ p.customize-section-description {
right: 100%; right: 100%;
} }
.themes-panel-back:before { .in-themes-panel .control-panel-back:before {
top: 13px; content: "\f341";
right: 14px; right: 14px;
} }
.in-themes-panel .themes-panel-back { .in-themes-panel .control-panel-back {
right: 0; right: 0;
} }
.in-sub-panel .themes-panel-back { .in-themes-panel .control-panel-back:before {
display: none;
}
.control-panel-back.themes-panel-back:before {
content: "\f341";
} }
/* Details View */ /* Details View */

File diff suppressed because one or more lines are too long

View File

@ -945,21 +945,16 @@ p.customize-section-description {
left: 100%; left: 100%;
} }
.themes-panel-back:before { .in-themes-panel .control-panel-back:before {
top: 13px; content: "\f345";
left: 14px; left: 14px;
} }
.in-themes-panel .themes-panel-back { .in-themes-panel .control-panel-back {
left: 0; left: 0;
} }
.in-sub-panel .themes-panel-back { .in-themes-panel .control-panel-back:before {
display: none;
}
.control-panel-back.themes-panel-back:before {
content: "\f345";
} }
/* Details View */ /* Details View */

File diff suppressed because one or more lines are too long

View File

@ -598,14 +598,17 @@
} }
}); });
section.container.find( '.themes-panel-back' ).on( 'click keydown', function( event ) {
$( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( event ) {
if ( api.utils.isKeydownButNotEnterEvent( event ) ) { if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
return; return;
} }
event.preventDefault(); // Keep this AFTER the key filter above event.preventDefault(); // Keep this AFTER the key filter above
section.collapse(); if ( section.expanded() ) {
section.collapse();
}
}); });
// Theme navigation in details view. // Theme navigation in details view.
@ -691,7 +694,7 @@
container = section.closest( '.wp-full-overlay-sidebar-content' ), container = section.closest( '.wp-full-overlay-sidebar-content' ),
siblings = container.find( '.open' ), siblings = container.find( '.open' ),
topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ), topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ),
backBtn = overlay.find( '.themes-panel-back' ), backBtn = overlay.find( '.control-panel-back' ),
panelTitle = section.find( '.accordion-section-title' ).first(), panelTitle = section.find( '.accordion-section-title' ).first(),
content = section.find( '.control-panel-content' ); content = section.find( '.control-panel-content' );

File diff suppressed because one or more lines are too long

View File

@ -345,7 +345,6 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
<?php echo esc_html( $this->title ); ?> <?php echo esc_html( $this->title ); ?>
<span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span> <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>
</h3> </h3>
<span class="control-panel-back themes-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
<div class="customize-themes-panel control-panel-content themes-php"> <div class="customize-themes-panel control-panel-content themes-php">
<h2><?php esc_html_e( 'Themes' ); ?> <h2><?php esc_html_e( 'Themes' ); ?>
<span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span> <span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-beta3-31917'; $wp_version = '4.2-beta3-31918';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.