Make WordPress Core

Changeset 29088


Ignore:
Timestamp:
07/11/2014 06:14:31 AM (11 years ago)
Author:
wonderboymusic
Message:

Media Grid, in the Edit Attachment modal:

  • Label the fields under the attachment a la the Edit Media page
  • Move the audio and video previews above the info
  • Remove the audio / video icon display. Unnecessary.
  • Ensure that width and max-width are set for .mejs-container

See #24716.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/media.css

    r28830 r29088  
    698698.mejs-container {
    699699    width: 100%;
     700    max-width: 100%;
    700701}
    701702
  • trunk/src/wp-includes/css/media-views.css

    r29086 r29088  
    15781578}
    15791579
     1580.edit-attachment-frame .attachment-info .filename {
     1581    font-weight: normal;
     1582    color: #666;
     1583}
     1584
    15801585.attachment-info .thumbnail {
    15811586    position: relative;
     
    15861591    margin-right: 10px;
    15871592    margin-bottom: 5px;
     1593}
     1594
     1595.edit-attachment-frame .attachment-info .thumbnail {
     1596    margin-bottom: 12px;
    15881597}
    15891598
     
    27672776
    27682777.edit-attachment-frame .wp-media-wrapper {
    2769     margin-top: 20px;
     2778    margin-bottom: 12px;
    27702779}
    27712780
  • trunk/src/wp-includes/media-template.php

    r29085 r29088  
    278278                <# } else if ( 'image' === data.type ) { #>
    279279                    <img src="{{ data.sizes.full.url }}" draggable="false" />
    280                 <# } else { #>
     280                <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
    281281                    <img src="{{ data.icon }}" class="icon" draggable="false" />
    282282                <# } #>
    283             </div>
    284             <div class="details">
    285                 <div class="filename">{{ data.filename }}</div>
    286                 <div class="uploaded">{{ data.dateFormatted }}</div>
    287 
    288                 <div class="file-size">{{ data.filesizeHumanReadable }}</div>
    289                 <# if ( 'image' === data.type && ! data.uploading ) { #>
    290                     <# if ( data.width && data.height ) { #>
    291                         <div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
    292                     <# } #>
    293                 <# } #>
    294 
    295                 <# if ( data.fileLength ) { #>
    296                     <div class="file-length"><?php _e( 'Length:' ); ?> {{ data.fileLength }}</div>
    297                 <# } #>
    298 
    299                 <# if ( ! data.uploading && data.can.remove ) { #>
    300                     <?php if ( MEDIA_TRASH ): ?>
    301                         <a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
    302                     <?php else: ?>
    303                         <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
    304                     <?php endif; ?>
    305                 <# } #>
    306 
    307                 <div class="compat-meta">
    308                     <# if ( data.compat && data.compat.meta ) { #>
    309                         {{{ data.compat.meta }}}
    310                     <# } #>
    311                 </div>
    312283            </div>
    313284            <# if ( 'audio' === data.type ) { #>
     
    326297            </div>
    327298            <# } #>
     299            <div class="details">
     300                <div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div>
     301                <div class="filename"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div>
     302                <div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div>
     303
     304                <div class="file-size"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div>
     305                <# if ( 'image' === data.type && ! data.uploading ) { #>
     306                    <# if ( data.width && data.height ) { #>
     307                        <div class="dimensions"><strong><?php _e( 'Dimensions:' ); ?></strong> {{ data.width }} &times; {{ data.height }}</div>
     308                    <# } #>
     309                <# } #>
     310
     311                <# if ( data.fileLength ) { #>
     312                    <div class="file-length"><strong><?php _e( 'Length:' ); ?></strong> {{ data.fileLength }}</div>
     313                <# } #>
     314
     315                <# if ( ! data.uploading && data.can.remove ) { #>
     316                    <?php if ( MEDIA_TRASH ): ?>
     317                        <a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
     318                    <?php else: ?>
     319                        <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
     320                    <?php endif; ?>
     321                <# } #>
     322
     323                <div class="compat-meta">
     324                    <# if ( data.compat && data.compat.meta ) { #>
     325                        {{{ data.compat.meta }}}
     326                    <# } #>
     327                </div>
     328            </div>
    328329        </div>
    329330        <div class="attachment-fields">
Note: See TracChangeset for help on using the changeset viewer.