Media: Use a full uploader status view in the inline uploader. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-22 12:54:49 +00:00
parent 2070f5ca49
commit f20573509b
3 changed files with 21 additions and 18 deletions

View File

@ -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;
}

View File

@ -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() {

View File

@ -1497,7 +1497,7 @@ function wp_print_media_templates( $attachment ) {
<a href="#" class="browser button button-hero"><?php _e( 'Select Files' ); ?></a>
</div>
<div class="upload-errors"></div>
<div class="upload-inline-status"></div>
<div class="post-upload-ui">
<?php do_action( 'pre-upload-ui' ); ?>