diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css index ec5447f5d0..be05e1a8c6 100644 --- a/wp-includes/css/media-views.css +++ b/wp-includes/css/media-views.css @@ -256,6 +256,7 @@ inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); background: #eee; cursor: pointer; + color: #464646; -webkit-user-select: none; -moz-user-select: none; @@ -308,6 +309,13 @@ transform: translate( -50%, -50% ); } +.attachment .filename { + margin-top: 140px; + padding: 0 10px; + text-align: center; + font-weight: bold; +} + .attachment .thumbnail, .attachment .thumbnail img { -webkit-transition-property: width, height, top, left, right, bottom; diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 72776e7eac..b72aa75413 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -406,22 +406,20 @@ render: function() { var attachment = this.model.toJSON(), - options = { - icon: attachment.icon, - uploading: attachment.uploading, - orientation: attachment.orientation || 'landscape', - type: attachment.type, - subtype: attachment.subtype, - buttons: this.buttons - }; + options = _.defaults( this.model.toJSON(), { + orientation: 'landscape', + uploading: false, + type: '' + }); + options.buttons = this.buttons; - if ( 'image' === attachment.type ) + if ( 'image' === options.type ) _.extend( options, this.crop() ); this.$el.html( this.template( options ) ); - if ( attachment.uploading ) + if ( options.uploading ) this.$bar = this.$('.media-progress-bar div'); else delete this.$bar; diff --git a/wp-includes/media.php b/wp-includes/media.php index 52dc6583e3..796f00d7f3 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1333,13 +1333,14 @@ function wp_print_media_templates( $attachment ) { + <% } else if ( uploading ) { %> +
<% } else { %> +
<%- filename %>
<% } %> - <% if ( uploading ) { %> -
- <% } %> + <% if ( buttons.close ) { %> ×