Ticket #39516: 39516.2.diff
File 39516.2.diff, 2.0 KB (added by , 6 years ago) |
---|
-
src/wp-includes/js/media/views/attachments/browser.js
41 41 this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); 42 42 this.controller.on( 'edit:selection', this.editSelection ); 43 43 this.createToolbar(); 44 this.createUploader(); 45 this.createAttachments(); 46 if ( this.options.sidebar ) { 47 this.createSidebar(); 44 // if its open in wp-admin/upload.php show sidebar first 45 if ( 'library' === this.model.id ) { 46 if ( this.options.sidebar ) { 47 this.createSidebar(); 48 } 49 this.createUploader(); 50 this.createAttachments(); 51 } else { 52 // if its open inside a modal (not in wp-admin/upload.php ) show uploader and attachments first 53 this.createUploader(); 54 this.createAttachments(); 55 if ( this.options.sidebar ) { 56 this.createSidebar(); 57 } 48 58 } 49 59 this.updateContent(); 50 60 -
src/wp-includes/js/media-views.js
3772 3772 this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); 3773 3773 this.controller.on( 'edit:selection', this.editSelection ); 3774 3774 this.createToolbar(); 3775 this.createUploader(); 3776 this.createAttachments(); 3777 if ( this.options.sidebar ) { 3778 this.createSidebar(); 3775 // if its open in wp-admin/upload.php show sidebar first 3776 if ( 'library' === this.model.id ) { 3777 if ( this.options.sidebar ) { 3778 this.createSidebar(); 3779 } 3780 this.createUploader(); 3781 this.createAttachments(); 3782 } else { 3783 // if its open inside a modal (not in wp-admin/upload.php ) show uploader and attachments first 3784 this.createUploader(); 3785 this.createAttachments(); 3786 if ( this.options.sidebar ) { 3787 this.createSidebar(); 3788 } 3779 3789 } 3780 3790 this.updateContent(); 3781 3791