WordPress.org

Make WordPress Core

Changeset 41860


Ignore:
Timestamp:
10/13/2017 09:20:42 PM (2 years ago)
Author:
westonruter
Message:

Customize: Fix positioning of device-previewed window when publish settings are open.

  • Update date control padding.
  • Collapse publish settings section when opening panes for available widgets or nav menus.
  • Remove save and cog buttons in mobile preview only mode.
  • Move definition of wp.customize.previewedDevice to wp.customize.state('previewedDevice') for centralization, maintaining old alias.
  • Remove unused CSS because the section is inside form now.

Props sayedwp, westonruter.
See #39896.
Fixes #42027, #42199.

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

Legend:

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

    r41853 r41860  
    128128}
    129129
    130 .outer-section-open .wp-full-overlay.expanded #customize-preview {
     130.outer-section-open .wp-full-overlay.expanded .wp-full-overlay-main {
    131131    left: 300px;
    132132    opacity: 0.4;
     133}
     134
     135.outer-section-open .wp-full-overlay.expanded.preview-tablet .wp-full-overlay-main,
     136.outer-section-open .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
     137.adding-menu-items .wp-full-overlay.expanded.preview-tablet .wp-full-overlay-main,
     138.adding-menu-items .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
     139.adding-widget .wp-full-overlay.expanded.preview-tablet .wp-full-overlay-main,
     140.adding-widget .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main {
     141    left: 64%;
    133142}
    134143
     
    380389    width: 100%;
    381390    margin-left: -12px;
    382     padding: 12px 12px 10px;
     391    padding: 12px;
    383392    background: #ffffff;
    384393    border-bottom: 1px solid #ddd;
     
    507516}
    508517
    509 #customize-controls .customize-info .customize-section-description,
    510 #customize-outer-theme-controls .customize-section-description {
     518#customize-controls .customize-info .customize-section-description {
    511519    margin-bottom: 15px;
    512520}
     
    563571#customize-controls .control-section .accordion-section-title:hover,
    564572#customize-controls .control-section.open .accordion-section-title,
    565 #customize-outer-theme-controls .control-section .accordion-section-title:hover,
    566 #customize-outer-theme-controls .control-section.open .accordion-section-title,
    567 #customize-outer-theme-controls .control-section .accordion-section-title:focus,
    568573#customize-controls .control-section .accordion-section-title:focus {
    569574    color: #0073aa;
     
    17251730#customize-controls .customize-section-title span.customize-action,
    17261731#customize-controls .control-section-themes .accordion-section-title span.customize-action,
    1727 #customize-controls .customize-section-title span.customize-action,
    1728 #customize-outer-theme-controls .customize-section-title span.customize-action {
     1732#customize-controls .customize-section-title span.customize-action {
    17291733    font-size: 13px;
    17301734    display: block;
     
    27922796}
    27932797
     2798@media screen and ( max-width: 1200px ) {
     2799    .outer-section-open .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
     2800    .adding-menu-items .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
     2801    .adding-widget .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main {
     2802        left: 67%;
     2803    }
     2804}
     2805
    27942806@media screen and ( max-width: 640px ) {
    27952807    #customize-controls {
     
    28382850    }
    28392851
     2852    .preview-only #customize-save-button-wrapper {
     2853        margin-top: -46px;
     2854    }
     2855
    28402856    .customize-controls-preview-toggle .preview:before,
    28412857    .customize-controls-preview-toggle .controls:before {
  • trunk/src/wp-admin/js/customize-controls.js

    r41845 r41860  
    67896789        'previewerAlive',
    67906790        'editShortcutVisibility',
    6791         'changesetLocked'
     6791        'changesetLocked',
     6792        'previewedDevice'
    67926793    ], function( name ) {
    67936794        api.state.create( name );
     
    83188319        }());
    83198320
    8320         // Previewed device bindings.
    8321         api.previewedDevice = new api.Value();
     8321        // Previewed device bindings. (The api.previewedDevice property is how this Value was first introduced, but since it has moved to api.state.)
     8322        api.previewedDevice = api.state( 'previewedDevice' );
    83228323
    83238324        // Set the default device.
  • trunk/src/wp-admin/js/customize-nav-menus.js

    r41832 r41860  
    682682
    683683            this.itemSectionHeight();
     684
     685            if ( api.section.has( 'publish_settings' ) ) {
     686                api.section( 'publish_settings' ).collapse();
     687            }
    684688
    685689            $( 'body' ).addClass( 'adding-menu-items' );
  • trunk/src/wp-admin/js/customize-widgets.js

    r41726 r41860  
    331331            } );
    332332
     333            if ( api.section.has( 'publish_settings' ) ) {
     334                api.section( 'publish_settings' ).collapse();
     335            }
     336
    333337            $( 'body' ).addClass( 'adding-widget' );
    334338
Note: See TracChangeset for help on using the changeset viewer.