From dad35768cf83189097f1273b1a81f54f1871d3bc Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sat, 28 Mar 2015 22:08:32 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@31918 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/customize-controls.css | 13 ++++--------- src/wp-admin/js/customize-controls.js | 9 ++++++--- src/wp-includes/class-wp-customize-section.php | 1 - 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index ea6c9eae75..030e02edcc 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -945,21 +945,16 @@ p.customize-section-description { left: 100%; } -.themes-panel-back:before { - top: 13px; +.in-themes-panel .control-panel-back:before { + content: "\f345"; left: 14px; } -.in-themes-panel .themes-panel-back { +.in-themes-panel .control-panel-back { left: 0; } -.in-sub-panel .themes-panel-back { - display: none; -} - -.control-panel-back.themes-panel-back:before { - content: "\f345"; +.in-themes-panel .control-panel-back:before { } /* Details View */ diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 1cd2ded387..86cb94954c 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -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 ) ) { return; } event.preventDefault(); // Keep this AFTER the key filter above - section.collapse(); + if ( section.expanded() ) { + section.collapse(); + } }); // Theme navigation in details view. @@ -691,7 +694,7 @@ container = section.closest( '.wp-full-overlay-sidebar-content' ), siblings = container.find( '.open' ), 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(), content = section.find( '.control-panel-content' ); diff --git a/src/wp-includes/class-wp-customize-section.php b/src/wp-includes/class-wp-customize-section.php index c2afac6d1e..779f9c6621 100644 --- a/src/wp-includes/class-wp-customize-section.php +++ b/src/wp-includes/class-wp-customize-section.php @@ -345,7 +345,6 @@ class WP_Customize_Themes_Section extends WP_Customize_Section { title ); ?> -

controls ) - 1; ?>