Media: Restore correct upload errors displaying after [37610].

Props codegeass, MatheusGimenez, joemcgill.
Fixes #39516.


git-svn-id: https://develop.svn.wordpress.org/trunk@40126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2017-02-26 18:14:07 +00:00
parent 5c99d4ae9c
commit cc8b551d69
2 changed files with 12 additions and 2 deletions

View File

@ -3772,9 +3772,14 @@ AttachmentsBrowser = View.extend({
this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
this.controller.on( 'edit:selection', this.editSelection );
this.createToolbar();
// In the Media Library, the sidebar is used to display errors before the attachments grid.
if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
this.createSidebar();
}
this.createUploader();
this.createAttachments();
if ( this.options.sidebar ) {
// For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
this.createSidebar();
}
this.updateContent();

View File

@ -41,9 +41,14 @@ AttachmentsBrowser = View.extend({
this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
this.controller.on( 'edit:selection', this.editSelection );
this.createToolbar();
// In the Media Library, the sidebar is used to display errors before the attachments grid.
if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
this.createSidebar();
}
this.createUploader();
this.createAttachments();
if ( this.options.sidebar ) {
// For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
this.createSidebar();
}
this.updateContent();