mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
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() {
|
render: function() {
|
||||||
var self = this,
|
var self = this,
|
||||||
args = arguments;
|
args = arguments;
|
||||||
|
|
||||||
if ( this.model.attachment && 'pending' === this.model.dfd.state() ) {
|
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() {
|
this.model.dfd.done( function() {
|
||||||
media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
|
media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
|
||||||
self.resetFocus();
|
self.resetFocus();
|
||||||
|
} ).fail( function() {
|
||||||
|
self.model.attachment = false;
|
||||||
|
media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
|
||||||
|
self.resetFocus();
|
||||||
} );
|
} );
|
||||||
} else {
|
} else {
|
||||||
media.view.Settings.AttachmentDisplay.prototype.render.apply( this, arguments );
|
media.view.Settings.AttachmentDisplay.prototype.render.apply( this, arguments );
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user