In the modal state for Embed previews, only show the Title field when the preview fails.
Props johnbillion, wonderboymusic. See #29476. Built from https://develop.svn.wordpress.org/trunk@31632 git-svn-id: http://core.svn.wordpress.org/trunk@31613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c06316b7ab
commit
ba977671b6
|
@ -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 );
|
||||
}
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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 );
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31631';
|
||||
$wp_version = '4.2-alpha-31632';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue