Ticket #47610: 47610.2.diff
| File 47610.2.diff, 7.1 KB (added by , 6 years ago) |
|---|
-
src/js/media/views/attachments/browser.js
154 154 }) ); 155 155 156 156 if ( -1 !== $.inArray( this.options.filters, [ 'uploaded', 'all' ] ) ) { 157 // Create a h2 heading before the select elements to filter attachments. 158 this.toolbar.set( 'filters-heading', new wp.media.view.Heading( { 159 priority: -100, 160 text: l10n.filterAttachments, 161 level: 'h2', 162 className: 'media-frame-filter-attachments-heading' 163 }).render() ); 164 157 165 // "Filters" will return a <select>, need to render 158 166 // screen reader text before 159 167 this.toolbar.set( 'filtersLabel', new wp.media.view.Label({ -
src/js/media/views/selection.js
1 var l10n = wp.media.view.l10n, 1 var _n = wp.i18n._n, 2 sprintf = wp.i18n.sprintf, 2 3 Selection; 3 4 4 5 /** … … 60 61 this.$el.toggleClass( 'one', 1 === collection.length ); 61 62 this.$el.toggleClass( 'editing', editing ); 62 63 63 this.$('.count').text( l10n.selected.replace('%d', collection.length) ); 64 this.$( '.count' ).text( 65 /* translators: %s: Number of selected media attachments. */ 66 sprintf( _n( '%s item selected', '%s items selected', collection.length ), collection.length ) 67 ); 64 68 }, 65 69 66 70 edit: function( event ) { -
src/wp-includes/css/media-views.css
268 268 } 269 269 270 270 .media-modal-content .media-frame select.attachment-filters { 271 margin-top: 11px;271 margin-top: 32px; 272 272 margin-right: 2%; 273 273 width: 42%; 274 274 width: calc(48% - 12px); … … 307 307 border-top: 1px solid #ddd; 308 308 } 309 309 310 @media screen and (max-width: 782px) {311 .media-frame-toolbar .media-toolbar {312 bottom: -48px;313 }314 }315 316 310 .media-toolbar-primary { 317 311 float: right; 318 312 height: 100%; … … 768 762 } 769 763 770 764 .media-frame.hide-menu .media-frame-menu, 765 .media-frame.hide-menu .media-frame-menu-heading, 771 766 .media-frame.hide-router .media-frame-router, 772 767 .media-frame.hide-toolbar .media-frame-toolbar { 773 768 display: none; … … 780 775 margin: 0; 781 776 } 782 777 778 .media-frame-menu-heading, 779 .media-frame-filter-attachments-heading { 780 position: absolute; 781 left: 20px; 782 top: 22px; 783 margin: 0; 784 font-size: 13px; 785 line-height: 1; 786 /* Above the media-frame-menu. */ 787 z-index: 151; 788 } 789 790 .media-frame-filter-attachments-heading { 791 top: 10px; 792 left: 16px; 793 } 794 783 795 .wp-core-ui .button.media-frame-menu-toggle { 784 796 display: none; 785 797 } … … 849 861 * Search 850 862 */ 851 863 .media-frame .search { 852 margin-top: 10px;864 margin-top: 32px; 853 865 padding: 4px; 854 866 font-size: 13px; 855 867 color: #444; … … 1106 1118 1107 1119 .attachments-browser .media-toolbar { 1108 1120 right: 300px; 1109 height: 50px; 1121 height: 72px; 1122 background: #fff; 1110 1123 } 1111 1124 1112 1125 .attachments-browser.hide-sidebar .media-toolbar { … … 1127 1140 .attachments-browser .attachments, 1128 1141 .attachments-browser .uploader-inline { 1129 1142 position: absolute; 1130 top: 50px;1143 top: 72px; 1131 1144 left: 0; 1132 1145 right: 300px; 1133 1146 bottom: 0; … … 2340 2353 margin: 5px 10px; 2341 2354 } 2342 2355 2356 /* Visually hide the mehu heading keeping it available to assistive technologies. */ 2357 .media-frame-menu-heading { 2358 clip: rect(1px, 1px, 1px, 1px); 2359 -webkit-clip-path: inset(50%); 2360 clip-path: inset(50%); 2361 height: 1px; 2362 overflow: hidden; 2363 padding: 0; 2364 width: 1px; 2365 word-wrap: normal !important; 2366 } 2367 2368 /* Reveal the menu toggle button. */ 2343 2369 .wp-core-ui .media-frame:not(.hide-menu) .button.media-frame-menu-toggle { 2344 2370 display: inline-flex; 2345 2371 align-items: center; … … 2554 2580 .media-frame select { 2555 2581 font-size: 16px; 2556 2582 } 2583 2584 .media-frame .media-toolbar input[type="search"] { 2585 line-height: 1.625; /* 26px */ 2586 } 2557 2587 } 2558 2588 2589 @media screen and (max-width: 782px) { 2590 .attachments-browser .media-toolbar { 2591 height: 82px; 2592 } 2593 2594 .attachments-browser .attachments, 2595 .attachments-browser .uploader-inline { 2596 top: 82px; 2597 } 2598 2599 .media-frame .media-toolbar input[type="search"] { 2600 line-height: 2.25; /* 36px */ 2601 } 2602 2603 .media-frame-toolbar .media-toolbar { 2604 bottom: -48px; 2605 } 2606 } 2607 2559 2608 /* Responsive on portrait and landscape */ 2560 2609 @media only screen and (max-width: 640px), screen and (max-height: 400px) { 2561 2610 /* Full-bleed modal */ -
src/wp-includes/media-template.php
178 178 <?php // Template for the media frame: used both in the media grid and in the media modal. ?> 179 179 <script type="text/html" id="tmpl-media-frame"> 180 180 <div class="media-frame-title" id="media-frame-title"></div> 181 <h2 class="media-frame-menu-heading"><?php _e( 'Media Types' ); ?></h2> 181 182 <button type="button" class="button button-link media-frame-menu-toggle" aria-expanded="false"> 182 183 <?php _e( 'Media Types' ); ?> 183 184 <span class="dashicons dashicons-arrow-down" aria-hidden="true"></span> … … 187 188 <div class="media-frame-router"></div> 188 189 <div class="media-frame-content"></div> 189 190 </div> 191 <h2 class="screen-reader-text"><?php _e( 'Available actions' ); ?></h2> 190 192 <div class="media-frame-toolbar"></div> 191 193 <div class="media-frame-uploader"></div> 192 194 </script> -
src/wp-includes/media.php
3931 3931 'addToVideoPlaylistTitle' => __( 'Add to Video Playlist' ), 3932 3932 3933 3933 // Headings 3934 'attachmentsList' => __( 'Attachments list' ), 3934 'filterAttachments' => __( 'Filter Media' ), 3935 'attachmentsList' => __( 'Media list' ), 3935 3936 ); 3936 3937 3937 3938 /** -
src/wp-includes/script-loader.php
1617 1617 1618 1618 // To enqueue media-views or media-editor, call wp_enqueue_media(). 1619 1619 // Both rely on numerous settings, styles, and templates to operate correctly. 1620 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y' ), false, 1 );1620 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'wp-i18n' ), false, 1 ); 1621 1621 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); 1622 1622 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); 1623 1623 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 );