Make WordPress Core


Ignore:
Timestamp:
10/29/2012 03:13:02 PM (12 years ago)
Author:
koopersmith
Message:

Add attachment details to the media sidebar.

  • Also moves most of the Frame view's createSelection method to a real Selection model (which inherits from the Attachments model).
  • Properly assigns the library within the Gallery state, allowing for the Gallery state to inherit from the Library state.

see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22322 r22323  
    13061306    <script type="text/html" id="tmpl-uploader-window">
    13071307        <div class="uploader-window-content">
    1308             <h3><?php _e( 'Drop files here to upload' ); ?></h3>
     1308            <h3><?php _e( 'Drop files to upload' ); ?></h3>
    13091309        </div>
    13101310    </script>
     
    13591359    </script>
    13601360
     1361    <script type="text/html" id="tmpl-attachment-details">
     1362        <div class="attachment-preview attachment-details-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>">
     1363            <% if ( uploading ) { %>
     1364                <div class="media-progress-bar"><div></div></div>
     1365            <% } else if ( 'image' === type ) { %>
     1366                <div class="thumbnail">
     1367                    <img src="<%- url %>" draggable="false" />
     1368                </div>
     1369            <% } else { %>
     1370                <div class="icon-thumbnail">
     1371                    <img src="<%- icon %>" class="icon" draggable="false" />
     1372                    <div class="filename"><%- filename %></div>
     1373                </div>
     1374            <% } %>
     1375        </div>
     1376
     1377        <% if ( 'image' === type ) { %>
     1378            <textarea class="describe"
     1379                placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>"
     1380                ><%- caption %></textarea>
     1381        <% } else { %>
     1382            <textarea class="describe"
     1383                <% if ( 'video' === type ) { %>
     1384                    placeholder="<?php esc_attr_e('Describe this video&hellip;'); ?>"
     1385                <% } else if ( 'audio' === type ) { %>
     1386                    placeholder="<?php esc_attr_e('Describe this audio file&hellip;'); ?>"
     1387                <% } else { %>
     1388                    placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
     1389                <% } %>
     1390                ><%- title %></textarea>
     1391        <% } %>
     1392    </script>
     1393
    13611394    <script type="text/html" id="tmpl-media-selection-preview">
    13621395        <div class="selected-img selected-count-<%- count %>">
Note: See TracChangeset for help on using the changeset viewer.