Make WordPress Core

Ticket #33184: 33184.10.diff

File 33184.10.diff, 3.3 KB (added by adamsilverstein, 10 years ago)
  • src/wp-admin/css/customize-controls.css

     
    12941294        #customize-preview {
    12951295                top: 45px;
    12961296                bottom: 0;
    1297                 height: auto;
    12981297        }
    12991298
    13001299        .wp-core-ui.wp-customizer .button {
  • src/wp-admin/css/customize-nav-menus.css

     
    710710        top: 60px; /* below title div / search input */
    711711        bottom: 0px; /* 100% height that still triggers lazy load */
    712712        max-height: none;
    713         width: 270px;
     713        width: 100%;
     714        padding: 1px 15px 15px;
     715        -webkit-box-sizing: border-box;
     716        -moz-box-sizing: border-box;
     717        box-sizing: border-box;
    714718}
    715719
    716720#available-menu-items .menu-item-tpl {
     
    10361040        display: none;
    10371041}
    10381042
     1043@media screen and ( max-width: 782px ) {
     1044        #available-menu-items #available-menu-items-search .accordion-section-content {
     1045                top: 63px;
     1046        }
     1047}
     1048
    10391049@media screen and ( max-width: 640px ) {
    10401050        body.adding-menu-items div#available-menu-items {
    10411051                top: 46px;
     
    10441054                width: 100%;
    10451055        }
    10461056
     1057        #available-menu-items #available-menu-items-search .accordion-section-content {
     1058                top: 133px;
     1059        }
     1060
    10471061        #available-menu-items .customize-section-title {
    10481062                display: block;
    10491063                margin: 0;
  • src/wp-admin/js/customize-nav-menus.js

     
    360360                        });
    361361                },
    362362
    363                 // Adjust the height of each section of items to fit the screen.
    364                 itemSectionHeight: function() {
    365                         var sections, totalHeight, accordionHeight, diff;
    366                         totalHeight = window.innerHeight;
    367                         sections = this.$el.find( '.accordion-section-content' );
    368                         accordionHeight =  46 * ( 1 + sections.length ) - 16; // Magic numbers.
    369                         diff = totalHeight - accordionHeight;
    370                         if ( 120 < diff && 290 > diff ) {
    371                                 sections.css( 'max-height', diff );
    372                         }
    373                 },
    374 
    375363                // Highlights a menu item.
    376364                select: function( menuitemTpl ) {
    377365                        this.selected = $( menuitemTpl );
     
    466454                open: function( menuControl ) {
    467455                        this.currentMenuControl = menuControl;
    468456
    469                         this.itemSectionHeight();
    470 
    471457                        $( 'body' ).addClass( 'adding-menu-items' );
    472458
    473459                        // Collapse all controls.
     
    538524                                content = panelMeta.find( '.customize-panel-description' ),
    539525                                options = $( '#screen-options-wrap' ),
    540526                                button = panelMeta.find( '.customize-screen-options-toggle' );
    541                         button.on( 'click', function() {
     527                        button.on( 'click keydown', function( event ) {
     528                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
     529                                        return;
     530                                }
     531                                event.preventDefault();
     532
    542533                                // Hide description
    543534                                if ( content.not( ':hidden' ) ) {
    544535                                        content.slideUp( 'fast' );
     
    561552                        } );
    562553
    563554                        // Help toggle
    564                         help.on( 'click', function() {
     555                        help.on( 'click keydown', function( event ) {
     556                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
     557                                        return;
     558                                }
     559                                event.preventDefault();
     560
    565561                                if ( 'true' === button.attr( 'aria-expanded' ) ) {
    566562                                        button.attr( 'aria-expanded', 'false' );
    567563                                        help.attr( 'aria-expanded', 'true' );