diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css index 7dab330780..3a97321b2c 100644 --- a/wp-includes/css/media-views.css +++ b/wp-includes/css/media-views.css @@ -933,6 +933,16 @@ margin-bottom: 5px; } +.uploading .attachment-info .thumbnail { + width: 120px; + height: 80px; + box-shadow: inset 0 0 15px rgba( 0, 0, 0, 0.1 ); +} + +.uploading .attachment-info .media-progress-bar { + margin-top: 32px; +} + .attachment-info .thumbnail:after { content: ''; display: block; diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 71c5eec0dd..8265f9d2af 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -1954,14 +1954,19 @@ render: function() { var attachment = this.model.toJSON(), options = _.defaults( this.model.toJSON(), { - orientation: 'landscape', - uploading: false, - type: '', - subtype: '', - icon: '', - filename: '', - caption: '', - title: '' + orientation: 'landscape', + uploading: false, + type: '', + subtype: '', + icon: '', + filename: '', + caption: '', + title: '', + dateFormatted: '', + width: '', + height: '', + compat: false, + alt: '' }); options.buttons = this.buttons; @@ -1972,6 +1977,7 @@ this.$el.html( this.template( options ) ); + this.$el.toggleClass( 'uploading', options.uploading ); if ( options.uploading ) this.$bar = this.$('.media-progress-bar div'); else diff --git a/wp-includes/js/plupload/wp-plupload.js b/wp-includes/js/plupload/wp-plupload.js index cf2ca84bda..a0db36dad5 100644 --- a/wp-includes/js/plupload/wp-plupload.js +++ b/wp-includes/js/plupload/wp-plupload.js @@ -147,7 +147,8 @@ window.wp = window.wp || {}; attributes = _.extend({ file: file, uploading: true, - date: new Date() + date: new Date(), + filename: file.name }, _.pick( file, 'loaded', 'size', 'percent' ) ); // Handle early mime type scanning for images. diff --git a/wp-includes/media.php b/wp-includes/media.php index da12220510..9b8ae4427d 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1454,7 +1454,7 @@ function wp_print_media_templates( $attachment ) {