Ticket #47138: 47138.2.diff
File 47138.2.diff, 7.7 KB (added by , 6 years ago) |
---|
-
src/js/media/views/attachments/browser.js
348 348 if ( this.options.search ) { 349 349 // Search is an input, a visually hidden label element needs to be rendered before. 350 350 this.toolbar.set( 'searchLabel', new wp.media.view.Label({ 351 value: l10n.searchMediaLabel, 351 value: l10n.searchLabel, 352 className: 'media-search-input-label', 352 353 attributes: { 353 354 'for': 'media-search-input' 354 355 }, -
src/js/media/views/button/select-mode-toggle.js
57 57 } ); 58 58 children.not( '.spinner, .media-button' ).hide(); 59 59 this.$el.show(); 60 toolbar.$el.addClass( 'media-toolbar-mode-select' ); 60 61 toolbar.$( '.delete-selected-button' ).removeClass( 'hidden' ); 61 62 } else { 62 63 this.model.set( { … … 65 66 } ); 66 67 this.controller.content.get().$el.removeClass( 'fixed' ); 67 68 toolbar.$el.css( 'width', '' ); 69 toolbar.$el.removeClass( 'media-toolbar-mode-select' ); 68 70 toolbar.$( '.delete-selected-button' ).addClass( 'hidden' ); 69 71 children.not( '.media-button' ).show(); 70 72 this.controller.state().get( 'selection' ).reset(); -
src/js/media/views/search.js
1 var l10n = wp.media.view.l10n, 2 Search; 1 var Search; 3 2 4 3 /** 5 4 * wp.media.view.Search … … 17 16 id: 'media-search-input', 18 17 19 18 attributes: { 20 type: 'search', 21 placeholder: l10n.searchMediaPlaceholder 19 type: 'search' 22 20 }, 23 21 24 22 events: { -
src/wp-admin/css/common.css
3984 3984 #screen-meta-links { 3985 3985 margin-bottom: 20px; /* Add margins beneath links for better spacing between boxes and elements */ 3986 3986 } 3987 3988 .wp-filter .search-form input[type="search"] { 3989 font-size: 1rem; 3990 } 3987 3991 } 3988 3992 3989 3993 /* Smartphone */ -
src/wp-admin/css/media.css
538 538 539 539 .media-frame.mode-grid .media-toolbar select { 540 540 margin: 0 10px 0 0; 541 font-size: 14px;542 541 } 543 542 544 543 .media-frame.mode-grid.mode-edit .media-toolbar-secondary > .select-mode-toggle-button { … … 555 554 margin-top: 0; 556 555 } 557 556 558 .media-frame.mode-grid .spinner { 559 margin-top: 16px; 557 .media-search-input-label { 558 margin: 0 .2em 0 0; 559 vertical-align: baseline; 560 560 } 561 561 562 .media-frame.mode-grid .media-search-input-label { 563 position: static; 564 margin: 0 .5em 0 0; 565 } 566 562 567 .attachments-browser .media-toolbar-secondary > .media-button { 563 568 margin-right: 10px; 564 569 } -
src/wp-admin/includes/class-wp-media-list-table.php
270 270 </div> 271 271 272 272 <div class="search-form"> 273 <label for="media-search-input" class=" screen-reader-text"><?php esc_html_e( 'Search Media' ); ?></label>274 <input type="search" placeholder="<?php esc_attr_e( 'Search media items...' ); ?>"id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>273 <label for="media-search-input" class="media-search-input-label"><?php esc_html_e( 'Search' ); ?></label> 274 <input type="search" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div> 275 275 </div> 276 276 <?php 277 277 } -
src/wp-includes/css/media-views.css
310 310 .media-toolbar-primary { 311 311 float: right; 312 312 height: 100%; 313 position: relative; 313 314 } 314 315 315 316 .media-toolbar-secondary { … … 882 883 max-width: 100%; 883 884 } 884 885 886 .media-frame .media-search-input-label { 887 position: absolute; 888 left: 0; 889 top: 10px; 890 margin: 0; 891 line-height: 1; 892 } 893 885 894 /** 886 895 * Attachments 887 896 */ … … 1165 1174 max-width: 33%; 1166 1175 } 1167 1176 1177 .mode-grid .attachments-browser .media-toolbar-primary { 1178 display: flex; 1179 align-items: center; 1180 } 1181 1182 .mode-grid .attachments-browser .media-toolbar-mode-select .media-toolbar-primary { 1183 display: none; 1184 } 1185 1168 1186 .attachments-browser .media-toolbar-secondary { 1169 1187 max-width: 66%; 1170 1188 } … … 1650 1668 vertical-align: middle; 1651 1669 } 1652 1670 1671 .media-frame.mode-grid .spinner { 1672 margin: 0; 1673 float: none; 1674 vertical-align: middle; 1675 } 1676 1677 .media-modal .media-toolbar .spinner { 1678 float: none; 1679 vertical-align: bottom; 1680 margin: 0 0 5px 5px; 1681 } 1682 1653 1683 .media-frame .spinner.is-active { 1654 1684 visibility: visible; 1655 1685 } 1656 1686 1657 .media-toolbar .spinner {1658 margin-top: 14px;1659 }1660 1661 1687 /** 1662 1688 * Attachment Details 1663 1689 */ … … 2493 2519 height: auto; 2494 2520 } 2495 2521 2522 .media-frame .media-toolbar input[type="search"] { 2523 line-height: 2.25; /* 36px */ 2524 } 2525 2496 2526 .media-sidebar .setting select.columns, 2497 2527 .attachment-details .setting select.columns { 2498 2528 width: auto; … … 2504 2534 padding: 3px 6px; 2505 2535 } 2506 2536 2537 .wp-admin .media-frame select { 2538 min-height: 40px; 2539 font-size: 16px; 2540 line-height: 1.625; 2541 padding: 5px 24px 5px 8px; 2542 } 2543 2507 2544 .image-details .column-image { 2508 2545 width: 30%; 2509 2546 left: 70%; … … 2590 2627 height: auto; 2591 2628 } 2592 2629 2593 .media-modal .attachments-browser .media-toolbar .spinner {2594 margin: 14px 2px 0;2595 }2596 2597 2630 /* Text inputs need to be 16px, or they force zooming on iOS */ 2598 2631 .media-frame input[type="text"], 2599 2632 .media-frame input[type="password"], … … 2607 2640 } 2608 2641 2609 2642 .media-frame .media-toolbar input[type="search"] { 2610 line-height: 1.625; /* 26px */2643 line-height: 2.3755; /* 38px */ 2611 2644 } 2645 2646 .media-modal .media-toolbar .spinner { 2647 margin-bottom: 10px; 2648 } 2612 2649 } 2613 2650 2614 2651 @media screen and (max-width: 782px) { … … 2621 2658 top: 82px; 2622 2659 } 2623 2660 2624 .media-frame .media-toolbar input[type="search"] {2625 line-height: 2.25; /* 36px */2626 }2627 2628 2661 .media-frame-toolbar .media-toolbar { 2629 2662 bottom: -48px; 2630 2663 } 2631 2664 } 2632 2665 2666 @media screen and (max-width: 782px) { 2667 .mode-grid .attachments-browser .media-toolbar-primary { 2668 display: block; 2669 } 2670 } 2671 2633 2672 /* Responsive on portrait and landscape */ 2634 2673 @media only screen and (max-width: 640px), screen and (max-height: 400px) { 2635 2674 /* Full-bleed modal */ -
src/wp-includes/media.php
3852 3852 'apply' => __( 'Apply' ), 3853 3853 'filterByDate' => __( 'Filter by date' ), 3854 3854 'filterByType' => __( 'Filter by type' ), 3855 'searchMediaLabel' => __( 'Search Media' ), 3856 'searchMediaPlaceholder' => __( 'Search media items...' ), // placeholder (no ellipsis) 3855 'searchLabel' => __( 'Search' ), 3856 'searchMediaLabel' => __( 'Search Media' ), // backwards compatibility pre-5.3 3857 'searchMediaPlaceholder' => __( 'Search media items...' ), // backwards compatibility pre-5.3 3857 3858 'mediaFound' => __( 'Number of media items found: %d' ), 3858 3859 'mediaFoundHasMoreResults' => __( 'Number of media items displayed: %d. Scroll the page for more results.' ), 3859 3860 'noMedia' => __( 'No media items found.' ),