CoreFiles by mySites.guru
image.js33 lines, 807 bytes, from wordpress-4.2-beta4.zip
Raw History Compare with 4.2-beta3
md5
4e9361dbe15119228d72a0899d1bf547
sha1
605d8213042c69cabdfe234e29985b437311661f
sha256
7de5bde1d57fe180fb2d9b05ff39d54bf0b444a3157dfb8902c96fdb8f947f2d
/*globals wp */

/**
 * wp.media.view.EmbedImage
 *
 * @class
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
	EmbedImage;

EmbedImage = AttachmentDisplay.extend({
	className: 'embed-media-settings',
	template:  wp.template('embed-image-settings'),

	initialize: function() {
		/**
		 * Call `initialize` directly on parent class with passed arguments
		 */
		AttachmentDisplay.prototype.initialize.apply( this, arguments );
		this.listenTo( this.model, 'change:url', this.updateImage );
	},

	updateImage: function() {
		this.$('img').attr( 'src', this.model.get('url') );
	}
});

module.exports = EmbedImage;

No other release has this exact content. See every version of this file.