WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/08/2012 11:20:04 PM (9 years ago)
Author:
koopersmith
Message:

Better thumbnail previews in the image editor.

  • Images are auto-cropped, then fit to the preview on hover (with a slight delay). This is an experiment; we'll see how it turns out.
  • Various style changes.

see #21390.

File:
1 edited

Legend:

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

    r22120 r22137  
    13311331    <script type="text/html" id="tmpl-attachment">
    13321332        <div class="attachment-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>">
    1333             <% if ( thumbnail ) { %>
    1334                 <img src="<%- thumbnail %>" draggable="false" />
     1333            <% if ( 'image' === type ) { %>
     1334                <div class="thumbnail">
     1335                    <img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false"
     1336                    style="top:<%- top %>px; left:<%- left %>px;" />
     1337                </div>
     1338            <% } else { %>
     1339                <img src="<%- icon %>" class="icon" draggable="false" />
    13351340            <% } %>
    13361341
     
    13441349
    13451350            <% if ( buttons.insert ) { %>
    1346                 <a class="insert button button-primary button-small" href="#"><?php _e( 'Insert' ); ?></a>
     1351                <a class="insert button button-small" href="#"><?php _e( 'Insert' ); ?></a>
    13471352            <% } %>
    13481353        </div>
Note: See TracChangeset for help on using the changeset viewer.