Properly render the image details modal when the image references an invalid attachment.
props gcorne. fixes #27537. Built from https://develop.svn.wordpress.org/trunk@27756 git-svn-id: http://core.svn.wordpress.org/trunk@27593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f947924b0a
commit
ed993e4c5c
|
@ -5930,11 +5930,15 @@
|
|||
render: function() {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
|
||||
if ( this.model.attachment && 'pending' === this.model.dfd.state() ) {
|
||||
// should instead show a spinner when the attachment is new and then add a listener that updates on change
|
||||
this.model.dfd.done( function() {
|
||||
media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
|
||||
self.resetFocus();
|
||||
} ).fail( function() {
|
||||
self.model.attachment = false;
|
||||
media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
|
||||
self.resetFocus();
|
||||
} );
|
||||
} else {
|
||||
media.view.Settings.AttachmentDisplay.prototype.render.apply( this, arguments );
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue