Ticket #40331: 40331.customizer.diff
File 40331.customizer.diff, 9.3 KB (added by , 15 months ago) |
---|
-
src/js/_enqueues/wp/customize/controls.js
3739 3739 ready: function() { 3740 3740 var control = this, newItem; 3741 3741 if ( 'dropdown-pages' === control.params.type && control.params.allow_addition ) { 3742 newItem = control.container.find( '.new-content-item ' );3742 newItem = control.container.find( '.new-content-item-wrapper' ); 3743 3743 newItem.hide(); // Hide in JS to preserve flex display when showing. 3744 3744 control.container.on( 'click', '.add-new-toggle', function( e ) { 3745 3745 $( e.currentTarget ).slideUp( 180 ); … … 4085 4085 } 4086 4086 4087 4087 toggle = control.container.find( '.add-new-toggle' ); 4088 container = control.container.find( '.new-content-item ' );4088 container = control.container.find( '.new-content-item-wrapper' ); 4089 4089 input = control.container.find( '.create-item-input' ); 4090 4090 title = input.val(); 4091 4091 select = control.container.find( 'select' ); -
src/wp-admin/css/customize-controls.css
1082 1082 float: left; 1083 1083 } 1084 1084 1085 #available-menu-items .accordion-section-content .new-content-item ,1086 .customize-control-dropdown-pages .new-content-item {1085 #available-menu-items .accordion-section-content .new-content-item-wrapper, 1086 .customize-control-dropdown-pages .new-content-item-wrapper { 1087 1087 width: calc(100% - 30px); 1088 1088 padding: 8px 15px; 1089 1089 position: absolute; … … 1090 1090 bottom: 0; 1091 1091 z-index: 10; 1092 1092 background: #f0f0f1; 1093 } 1094 1095 .customize-control-dropdown-pages .new-content-item-wrapper { 1096 width: 100%; 1097 padding: 0; 1098 position: static; 1099 } 1100 1101 #available-menu-items .accordion-section-content .new-content-item, 1102 .customize-control-dropdown-pages .new-content-item { 1093 1103 display: flex; 1094 1104 } 1095 1105 … … 1099 1109 position: relative; 1100 1110 } 1101 1111 1112 .customize-control-dropdown-pages .new-content-item-wrapper .new-content-item { 1113 padding: 0; 1114 } 1115 1102 1116 #available-menu-items .new-content-item .create-item-input, 1103 1117 .customize-control-dropdown-pages .new-content-item .create-item-input { 1104 1118 flex-grow: 10; … … 2580 2594 } 2581 2595 2582 2596 #available-widgets-list { 2583 top: 60px;2597 top: 76px; 2584 2598 position: absolute; 2585 2599 overflow: auto; 2586 2600 bottom: 0; … … 2624 2638 #available-widgets-filter .search-icon { 2625 2639 display: block; 2626 2640 position: absolute; 2627 top: 15px; /* 13 container padding +1 input margin +1 input border */2641 bottom: 15px; /* 13 container padding +1 input margin +1 input border */ 2628 2642 left: 16px; 2629 2643 width: 30px; 2630 2644 height: 30px; … … 2636 2650 #available-widgets-filter .clear-results, 2637 2651 #available-menu-items-search .clear-results { 2638 2652 position: absolute; 2639 top: 15px; /* 13 container padding +1 input margin +1 input border */2653 top: 35px; /* 13 container padding +1 input margin +1 input border */ 2640 2654 right: 16px; 2641 2655 width: 30px; 2642 2656 height: 30px; -
src/wp-admin/css/customize-nav-menus.css
581 581 } 582 582 583 583 #available-menu-items .accordion-section-content .available-menu-items-list { 584 margin: 0 0 45px;584 margin: 0 0 64px; 585 585 padding: 1px 15px 15px; 586 586 } 587 587 … … 680 680 681 681 #available-menu-items-search .spinner { 682 682 position: absolute; 683 top: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */683 bottom: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */ 684 684 right: 21px; 685 685 margin: 0 !important; 686 686 } … … 689 689 #available-menu-items #available-menu-items-search .accordion-section-content { 690 690 position: absolute; 691 691 left: 0; 692 top: 60px; /* below title div / search input */692 top: 75px; /* below title div / search input */ 693 693 bottom: 0; /* 100% height that still triggers lazy load */ 694 694 max-height: none; 695 695 width: 100%; -
src/wp-includes/class-wp-customize-control.php
635 635 printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item ); 636 636 ?> 637 637 </button> 638 <div class="new-content-item"> 639 <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><span class="screen-reader-text"> 640 <?php 641 /* translators: Hidden accessibility text. */ 642 _e( 'New page title' ); 643 ?> 644 </span></label> 645 <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title…' ); ?>"> 646 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> 638 <div class="new-content-item-wrapper"> 639 <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><?php _e( 'New page title' ); ?></label> 640 <div class="new-content-item"> 641 <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" > 642 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> 643 </div> 647 644 </div> 648 645 <?php endif; ?> 649 646 <?php -
src/wp-includes/class-wp-customize-nav-menus.php
1163 1163 </div> 1164 1164 <div id="available-menu-items-search" class="accordion-section cannot-expand"> 1165 1165 <div class="accordion-section-title"> 1166 <label class="screen-reader-text" for="menu-items-search"> 1167 <?php 1168 /* translators: Hidden accessibility text. */ 1169 _e( 'Search Menu Items' ); 1170 ?> 1171 </label> 1172 <input type="text" id="menu-items-search" placeholder="<?php esc_attr_e( 'Search menu items…' ); ?>" aria-describedby="menu-items-search-desc" /> 1166 <label for="menu-items-search"><?php _e( 'Search Menu Items' ); ?></label> 1167 <input type="text" id="menu-items-search" aria-describedby="menu-items-search-desc" /> 1173 1168 <p class="screen-reader-text" id="menu-items-search-desc"> 1174 1169 <?php 1175 1170 /* translators: Hidden accessibility text. */ … … 1177 1172 ?> 1178 1173 </p> 1179 1174 <span class="spinner"></span> 1175 <div class="search-icon" aria-hidden="true"></div> 1180 1176 </div> 1181 <div class="search-icon" aria-hidden="true"></div>1182 1177 <button type="button" class="clear-results"><span class="screen-reader-text"> 1183 1178 <?php 1184 1179 /* translators: Hidden accessibility text. */ … … 1243 1238 <?php if ( 'post_type' === $available_item_type['type'] ) : ?> 1244 1239 <?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?> 1245 1240 <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?> 1246 <div class="new-content-item"> 1247 <label for="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="screen-reader-text"><?php echo esc_html( $post_type_obj->labels->add_new_item ); ?></label> 1248 <input type="text" id="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>"> 1249 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> 1241 <div class="new-content-item-wrapper"> 1242 <label for="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>"><?php echo esc_html( $post_type_obj->labels->add_new_item ); ?></label> 1243 <div class="new-content-item"> 1244 <input type="text" id="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="create-item-input"> 1245 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> 1246 </div> 1250 1247 </div> 1251 1248 <?php endif; ?> 1252 1249 <?php endif; ?> -
src/wp-includes/class-wp-customize-widgets.php
909 909 </h3> 910 910 </div> 911 911 <div id="available-widgets-filter"> 912 <label class="screen-reader-text"for="widgets-search">912 <label for="widgets-search"> 913 913 <?php 914 914 /* translators: Hidden accessibility text. */ 915 915 _e( 'Search Widgets' ); 916 916 ?> 917 917 </label> 918 <input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets…' ); ?>"aria-describedby="widgets-search-desc" />918 <input type="text" id="widgets-search" aria-describedby="widgets-search-desc" /> 919 919 <div class="search-icon" aria-hidden="true"></div> 920 920 <button type="button" class="clear-results"><span class="screen-reader-text"> 921 921 <?php