Make WordPress Core

Changeset 22603


Ignore:
Timestamp:
11/15/2012 11:53:06 PM (14 years ago)
Author:
koopersmith
Message:

Media: Update in-grid captions.

  • Use input fields instead of textboxes (which provide better handling for smaller attachments).
  • Provide data-setting properties to properly sync the changes.

see #21390.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/css/media-views.css

    r22595 r22603  
    604604        display: block;
    605605        width: 100%;
    606         height: 50px;
    607606        margin: -1px 0 0;
    608607        padding: 8px;
  • trunk/wp-includes/media.php

    r22594 r22603  
    14481448                <# if ( data.describe ) { #>
    14491449                        <# if ( 'image' === data.type ) { #>
    1450                                 <textarea class="describe"
    1451                                         placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>"
    1452                                         >{{ data.caption }}</textarea>
     1450                                <input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
     1451                                        placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>" />
    14531452                        <# } else { #>
    1454                                 <textarea class="describe"
     1453                                <input type="text" value="{{ data.title }}" class="describe" data-setting="title"
    14551454                                        <# if ( 'video' === data.type ) { #>
    14561455                                                placeholder="<?php esc_attr_e('Describe this video&hellip;'); ?>"
    … …  
    14591458                                        <# } else { #>
    14601459                                                placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
    1461                                         <# } #>
    1462                                         >{{ data.title }}</textarea>
     1460                                        <# } #> />
    14631461                        <# } #>
    14641462                <# } #>
Note: See TracChangeset for help on using the changeset viewer.