Ticket #33184: 33184.10.diff
| File 33184.10.diff, 3.3 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/css/customize-controls.css
1294 1294 #customize-preview { 1295 1295 top: 45px; 1296 1296 bottom: 0; 1297 height: auto;1298 1297 } 1299 1298 1300 1299 .wp-core-ui.wp-customizer .button { -
src/wp-admin/css/customize-nav-menus.css
710 710 top: 60px; /* below title div / search input */ 711 711 bottom: 0px; /* 100% height that still triggers lazy load */ 712 712 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; 714 718 } 715 719 716 720 #available-menu-items .menu-item-tpl { … … 1036 1040 display: none; 1037 1041 } 1038 1042 1043 @media screen and ( max-width: 782px ) { 1044 #available-menu-items #available-menu-items-search .accordion-section-content { 1045 top: 63px; 1046 } 1047 } 1048 1039 1049 @media screen and ( max-width: 640px ) { 1040 1050 body.adding-menu-items div#available-menu-items { 1041 1051 top: 46px; … … 1044 1054 width: 100%; 1045 1055 } 1046 1056 1057 #available-menu-items #available-menu-items-search .accordion-section-content { 1058 top: 133px; 1059 } 1060 1047 1061 #available-menu-items .customize-section-title { 1048 1062 display: block; 1049 1063 margin: 0; -
src/wp-admin/js/customize-nav-menus.js
360 360 }); 361 361 }, 362 362 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 375 363 // Highlights a menu item. 376 364 select: function( menuitemTpl ) { 377 365 this.selected = $( menuitemTpl ); … … 466 454 open: function( menuControl ) { 467 455 this.currentMenuControl = menuControl; 468 456 469 this.itemSectionHeight();470 471 457 $( 'body' ).addClass( 'adding-menu-items' ); 472 458 473 459 // Collapse all controls. … … 538 524 content = panelMeta.find( '.customize-panel-description' ), 539 525 options = $( '#screen-options-wrap' ), 540 526 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 542 533 // Hide description 543 534 if ( content.not( ':hidden' ) ) { 544 535 content.slideUp( 'fast' ); … … 561 552 } ); 562 553 563 554 // 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 565 561 if ( 'true' === button.attr( 'aria-expanded' ) ) { 566 562 button.attr( 'aria-expanded', 'false' ); 567 563 help.attr( 'aria-expanded', 'true' );