From 3f7b1ca2fff4c73bcd4fcf5479237128cfae3f72 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sun, 9 Aug 2015 18:59:34 +0000 Subject: [PATCH] Customizer: Remove obsolete `.control-panel-back` and `.customize-overlay-close` buttons. props afercia, ocean90. see #31336. fixes #33229. git-svn-id: https://develop.svn.wordpress.org/trunk@33599 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/customize-controls.css | 47 ------------------------- src/wp-admin/customize.php | 32 +++++++---------- src/wp-admin/js/customize-controls.js | 12 ------- src/wp-admin/js/customize-widgets.js | 2 +- 4 files changed, 13 insertions(+), 80 deletions(-) diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index ddbf20f7c4..46c4170bff 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -41,10 +41,6 @@ body { border-bottom: 1px solid #ddd; } -#customize-header-actions .secondary-actions { - display: none; -} - #customize-controls .wp-full-overlay-sidebar-content { overflow-y: auto; overflow-x: hidden; @@ -273,10 +269,6 @@ h3.customize-section-title { left: -100%; } -.section-open .control-panel-back { - display: none; -} - .accordion-sub-container.control-panel-content { display: none; position: absolute; @@ -300,7 +292,6 @@ h3.customize-section-title { width: 100%; } -.customize-overlay-close, .customize-controls-close { display: block; position: absolute; @@ -322,29 +313,6 @@ h3.customize-section-title { box-sizing: content-box; } -.customize-overlay-close { - left: auto; - right: 0; - border-right: 0; - border-left: 1px solid #ddd; -} - -.control-panel-back { - display: block; - position: fixed; - top: 0; - z-index: 99; - left: -48px; - width: 45px; - height: 45px; - padding-right: 2px; - background: #eee; - border-right: 1px solid #ddd; - cursor: pointer; - -webkit-transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out; - transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out; -} - .customize-panel-back, .customize-section-back { display: block; @@ -367,14 +335,12 @@ h3.customize-section-title { height: 70px; } -.ios .control-panel-back, .ios .customize-panel-back, .ios .customize-section-back { -webkit-transition: left 0s; transition: left 0s; } -.collapsed .control-panel-back, .ios .customize-panel-back { display: none; } @@ -392,12 +358,8 @@ h3.customize-section-title { color: #555; } -.customize-overlay-close:focus, -.customize-overlay-close:hover, .customize-controls-close:focus, .customize-controls-close:hover, -.control-panel-back:focus, -.control-panel-back:hover, .customize-controls-preview-toggle:focus, .customize-controls-preview-toggle:hover { background: #ddd; @@ -419,7 +381,6 @@ h3.customize-section-title { box-shadow: none; } -.customize-overlay-close:before, .customize-controls-close:before { font: normal 22px/45px dashicons; content: "\f335"; @@ -436,14 +397,6 @@ h3.customize-section-title { left: 13px; } -.control-panel-back:before { - font: normal 20px/45px dashicons; - content: "\f341"; - position: relative; - top: 1px; - left: 13px; -} - .wp-full-overlay-sidebar .wp-full-overlay-header { -webkit-transition: padding ease-in-out .18s; transition: padding ease-in-out .18s; diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index 4f176781fc..6ee2de007a 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -123,26 +123,18 @@ do_action( 'customize_controls_print_scripts' );
-
- is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); - submit_button( $save_text, 'primary save', 'save', false ); - ?> - - - - - - - - - -
-
- -
+ is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); + submit_button( $save_text, 'primary save', 'save', false ); + ?> + + + + + + + +
diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 56a9e62d2c..6d48967e1a 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -3388,18 +3388,6 @@ event.preventDefault(); }); - // Go back to the top-level Customizer accordion. - $( '#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 - api.panel.each( function ( panel ) { - panel.collapse(); - }); - }); - closeBtn.keydown( function( event ) { if ( 9 === event.which ) // tab return; diff --git a/src/wp-admin/js/customize-widgets.js b/src/wp-admin/js/customize-widgets.js index f1490a5638..6a640e0efa 100644 --- a/src/wp-admin/js/customize-widgets.js +++ b/src/wp-admin/js/customize-widgets.js @@ -177,7 +177,7 @@ // If the available widgets panel is open and the customize controls are // interacted with (i.e. available widgets panel is blurred) then close the // available widgets panel. Also close on back button click. - $( '#customize-controls, .customize-overlay-close, #available-widgets .customize-section-title' ).on( 'click keydown', function( e ) { + $( '#customize-controls, #available-widgets .customize-section-title' ).on( 'click keydown', function( e ) { var isAddNewBtn = $( e.target ).is( '.add-new-widget, .add-new-widget *' ); if ( $( 'body' ).hasClass( 'adding-widget' ) && ! isAddNewBtn ) { self.close();