mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
In the modal state for Embed previews, only show the Title field when the preview fails.
Props johnbillion, wonderboymusic. See #29476. git-svn-id: https://develop.svn.wordpress.org/trunk@31632 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2d120c988e
commit
b44cf676b1
@ -4635,7 +4635,13 @@ EmbedLink = Settings.extend({
|
||||
post_ID: wp.media.view.settings.post.id,
|
||||
shortcode: embed.string()
|
||||
}
|
||||
} ).done( _.bind( this.renderoEmbed, this ) );
|
||||
} )
|
||||
.done( _.bind( this.renderoEmbed, this ) )
|
||||
.fail( _.bind( this.renderFail, this ) );
|
||||
},
|
||||
|
||||
renderFail: function () {
|
||||
this.$( '.setting' ).hide().filter( '.title' ).show();
|
||||
},
|
||||
|
||||
renderoEmbed: function( response ) {
|
||||
@ -4643,6 +4649,9 @@ EmbedLink = Settings.extend({
|
||||
attr = {},
|
||||
opts = { silent: true };
|
||||
|
||||
this.$( '.setting' ).hide()
|
||||
.filter( '.title' )[ html ? 'hide' : 'show' ]();
|
||||
|
||||
if ( response && response.attr ) {
|
||||
attr = response.attr;
|
||||
|
||||
@ -4664,7 +4673,7 @@ EmbedLink = Settings.extend({
|
||||
}
|
||||
|
||||
this.spinner.hide();
|
||||
|
||||
|
||||
this.$('.embed-container').show().find('.embed-preview').html( html );
|
||||
}
|
||||
});
|
||||
|
@ -58,7 +58,13 @@ EmbedLink = Settings.extend({
|
||||
post_ID: wp.media.view.settings.post.id,
|
||||
shortcode: embed.string()
|
||||
}
|
||||
} ).done( _.bind( this.renderoEmbed, this ) );
|
||||
} )
|
||||
.done( _.bind( this.renderoEmbed, this ) )
|
||||
.fail( _.bind( this.renderFail, this ) );
|
||||
},
|
||||
|
||||
renderFail: function () {
|
||||
this.$( '.setting' ).hide().filter( '.title' ).show();
|
||||
},
|
||||
|
||||
renderoEmbed: function( response ) {
|
||||
@ -66,6 +72,9 @@ EmbedLink = Settings.extend({
|
||||
attr = {},
|
||||
opts = { silent: true };
|
||||
|
||||
this.$( '.setting' ).hide()
|
||||
.filter( '.title' )[ html ? 'hide' : 'show' ]();
|
||||
|
||||
if ( response && response.attr ) {
|
||||
attr = response.attr;
|
||||
|
||||
@ -87,7 +96,7 @@ EmbedLink = Settings.extend({
|
||||
}
|
||||
|
||||
this.spinner.hide();
|
||||
|
||||
|
||||
this.$('.embed-container').show().find('.embed-preview').html( html );
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user