Make WordPress Core

Ticket #47138: 47138.2.diff

File 47138.2.diff, 7.7 KB (added by afercia, 6 years ago)
  • src/js/media/views/attachments/browser.js

     
    348348                if ( this.options.search ) {
    349349                        // Search is an input, a visually hidden label element needs to be rendered before.
    350350                        this.toolbar.set( 'searchLabel', new wp.media.view.Label({
    351                                 value: l10n.searchMediaLabel,
     351                                value: l10n.searchLabel,
     352                                className: 'media-search-input-label',
    352353                                attributes: {
    353354                                        'for': 'media-search-input'
    354355                                },
  • src/js/media/views/button/select-mode-toggle.js

     
    5757                        } );
    5858                        children.not( '.spinner, .media-button' ).hide();
    5959                        this.$el.show();
     60                        toolbar.$el.addClass( 'media-toolbar-mode-select' );
    6061                        toolbar.$( '.delete-selected-button' ).removeClass( 'hidden' );
    6162                } else {
    6263                        this.model.set( {
     
    6566                        } );
    6667                        this.controller.content.get().$el.removeClass( 'fixed' );
    6768                        toolbar.$el.css( 'width', '' );
     69                        toolbar.$el.removeClass( 'media-toolbar-mode-select' );
    6870                        toolbar.$( '.delete-selected-button' ).addClass( 'hidden' );
    6971                        children.not( '.media-button' ).show();
    7072                        this.controller.state().get( 'selection' ).reset();
  • src/js/media/views/search.js

     
    1 var l10n = wp.media.view.l10n,
    2         Search;
     1var Search;
    32
    43/**
    54 * wp.media.view.Search
     
    1716        id:        'media-search-input',
    1817
    1918        attributes: {
    20                 type:        'search',
    21                 placeholder: l10n.searchMediaPlaceholder
     19                type: 'search'
    2220        },
    2321
    2422        events: {
  • src/wp-admin/css/common.css

     
    39843984        #screen-meta-links {
    39853985                margin-bottom: 20px; /* Add margins beneath links for better spacing between boxes and elements */
    39863986        }
     3987
     3988        .wp-filter .search-form input[type="search"] {
     3989                font-size: 1rem;
     3990        }
    39873991}
    39883992
    39893993/* Smartphone */
  • src/wp-admin/css/media.css

     
    538538
    539539.media-frame.mode-grid .media-toolbar select {
    540540        margin: 0 10px 0 0;
    541         font-size: 14px;
    542541}
    543542
    544543.media-frame.mode-grid.mode-edit .media-toolbar-secondary > .select-mode-toggle-button {
     
    555554        margin-top: 0;
    556555}
    557556
    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;
    560560}
    561561
     562.media-frame.mode-grid .media-search-input-label {
     563        position: static;
     564        margin: 0 .5em 0 0;
     565}
     566
    562567.attachments-browser .media-toolbar-secondary > .media-button {
    563568        margin-right: 10px;
    564569}
  • src/wp-admin/includes/class-wp-media-list-table.php

     
    270270        </div>
    271271
    272272        <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>
    275275        </div>
    276276                <?php
    277277        }
  • src/wp-includes/css/media-views.css

     
    310310.media-toolbar-primary {
    311311        float: right;
    312312        height: 100%;
     313        position: relative;
    313314}
    314315
    315316.media-toolbar-secondary {
     
    882883        max-width: 100%;
    883884}
    884885
     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
    885894/**
    886895 * Attachments
    887896 */
     
    11651174        max-width: 33%;
    11661175}
    11671176
     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
    11681186.attachments-browser .media-toolbar-secondary {
    11691187        max-width: 66%;
    11701188}
     
    16501668        vertical-align: middle;
    16511669}
    16521670
     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
    16531683.media-frame .spinner.is-active {
    16541684        visibility: visible;
    16551685}
    16561686
    1657 .media-toolbar .spinner {
    1658         margin-top: 14px;
    1659 }
    1660 
    16611687/**
    16621688 * Attachment Details
    16631689 */
     
    24932519                height: auto;
    24942520        }
    24952521
     2522        .media-frame .media-toolbar input[type="search"] {
     2523                line-height: 2.25; /* 36px */
     2524        }
     2525
    24962526        .media-sidebar .setting select.columns,
    24972527        .attachment-details .setting select.columns {
    24982528                width: auto;
     
    25042534                padding: 3px 6px;
    25052535        }
    25062536
     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
    25072544        .image-details .column-image {
    25082545                width: 30%;
    25092546                left: 70%;
     
    25902627                height: auto;
    25912628        }
    25922629
    2593         .media-modal .attachments-browser .media-toolbar .spinner {
    2594                 margin: 14px 2px 0;
    2595         }
    2596 
    25972630        /* Text inputs need to be 16px, or they force zooming on iOS */
    25982631        .media-frame input[type="text"],
    25992632        .media-frame input[type="password"],
     
    26072640        }
    26082641
    26092642        .media-frame .media-toolbar input[type="search"] {
    2610                 line-height: 1.625; /* 26px */
     2643                line-height: 2.3755; /* 38px */
    26112644        }
     2645
     2646        .media-modal .media-toolbar .spinner {
     2647                margin-bottom: 10px;
     2648        }
    26122649}
    26132650
    26142651@media screen and (max-width: 782px) {
     
    26212658                top: 82px;
    26222659        }
    26232660
    2624         .media-frame .media-toolbar input[type="search"] {
    2625                 line-height: 2.25; /* 36px */
    2626         }
    2627 
    26282661        .media-frame-toolbar .media-toolbar {
    26292662                bottom: -48px;
    26302663        }
    26312664}
    26322665
     2666@media screen and (max-width: 782px) {
     2667        .mode-grid .attachments-browser .media-toolbar-primary {
     2668                display: block;
     2669        }
     2670}
     2671
    26332672/* Responsive on portrait and landscape */
    26342673@media only screen and (max-width: 640px), screen and (max-height: 400px) {
    26352674        /* Full-bleed modal */
  • src/wp-includes/media.php

     
    38523852                'apply'                       => __( 'Apply' ),
    38533853                'filterByDate'                => __( 'Filter by date' ),
    38543854                '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
    38573858                'mediaFound'                  => __( 'Number of media items found: %d' ),
    38583859                'mediaFoundHasMoreResults'    => __( 'Number of media items displayed: %d. Scroll the page for more results.' ),
    38593860                'noMedia'                     => __( 'No media items found.' ),