diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css index fe5491f33c..b7d30edc2b 100644 --- a/wp-includes/css/media-views.css +++ b/wp-includes/css/media-views.css @@ -757,10 +757,17 @@ a.media-modal-close { .media-uploader-status { position: relative; padding-bottom: 10px; +} + +.media-sidebar .media-uploader-status { border-bottom: 1px solid #dfdfdf; box-shadow: 0 1px 0 #fff; } +.uploader-inline .media-uploader-status h3 { + display: none; +} + .media-uploader-status .upload-details { display: none; font-size: 12px; @@ -791,10 +798,13 @@ a.media-modal-close { } .media-uploader-status .upload-dismiss-errors { + text-decoration: none; +} + +.media-sidebar .media-uploader-status .upload-dismiss-errors { position: absolute; top: 0; right: 0; - text-decoration: none; } .upload-errors .upload-error { @@ -811,8 +821,12 @@ a.media-modal-close { margin-right: 8px; font-weight: bold; color: #fff; - background: #f00; - background: -webkit-linear-gradient( top, #e00, #a00 ); + background: #e00; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e00), to(#a00)); + background-image: -webkit-linear-gradient(top, #e00, #a00); + background-image: -moz-linear-gradient(top, #e00, #a00); + background-image: -o-linear-gradient(top, #e00, #a00); + background-image: linear-gradient(to bottom, #e00, #a00); border-radius: 3px; } diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index f3ab57b0ff..8ace09c3f6 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -1793,19 +1793,8 @@ if ( ! this.options.$browser && this.controller.uploader ) this.options.$browser = this.controller.uploader.$browser; - wp.Uploader.errors.on( 'add', this.error, this ); - }, - - dispose: function() { - wp.Uploader.errors.off( null, null, this ); - media.View.prototype.dispose.apply( this, arguments ); - return this; - }, - - error: function( error ) { - this.views.set( '.upload-errors', new media.view.UploaderStatusError({ - filename: error.get('file').name, - message: error.get('message') + this.views.set( '.upload-inline-status', new media.view.UploaderStatus({ + controller: this.controller }) ); }, @@ -1844,9 +1833,9 @@ this.queue.on( 'add remove reset change:uploading', this.info, this ); this.errors = wp.Uploader.errors; + this.errors.reset(); this.errors.on( 'add remove reset', this.visibility, this ); this.errors.on( 'add', this.error, this ); - _.each( this.errors.models, this.error, this ); }, dispose: function() { diff --git a/wp-includes/media.php b/wp-includes/media.php index eab9e276a6..131873a9ec 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1497,7 +1497,7 @@ function wp_print_media_templates( $attachment ) { -
+