Media Modal: Show progress bars for uploading images, and adjust progress bar styles to compensate for the darker attachment background. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22176 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-10-11 00:36:42 +00:00
parent 56829be438
commit b0d215a771
2 changed files with 6 additions and 5 deletions

View File

@ -442,15 +442,16 @@
width: 70%;
margin: 10px auto;
padding: 2px;
border: 2px solid #dfdfdf;
border: 2px solid #ccc;
border-radius: 8px;
background: #fff;
}
.media-progress-bar div {
height: 8px;
min-width: 8px;
width: 0;
background: #dfdfdf;
background: #ccc;
border-radius: 10px;
-webkit-transition: width 200ms;
-moz-transition: width 200ms;

View File

@ -1329,13 +1329,13 @@ function wp_print_media_templates( $attachment ) {
<script type="text/html" id="tmpl-attachment">
<div class="attachment-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>">
<% if ( 'image' === type ) { %>
<% if ( uploading ) { %>
<div class="media-progress-bar"><div></div></div>
<% } else if ( 'image' === type ) { %>
<div class="thumbnail">
<img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false"
style="top:<%- top %>px; left:<%- left %>px;" />
</div>
<% } else if ( uploading ) { %>
<div class="media-progress-bar"><div></div></div>
<% } else { %>
<img src="<%- icon %>" class="icon" draggable="false" />
<div class="filename"><%- filename %></div>