CoreFiles by mySites.guru
image.js33 lines, 813 bytes, from wordpress-4.2-beta1.zip
Raw History Compare with 4.1-beta2
md5
7b9ba65cf8614c5a2fb8ca5e57e375ec
sha1
84b0cb9504724fda84d335e5a5693a8c270cd59a
sha256
f9143320a3ca16764cd76f616320d805f917f061178c68cdba6203c49dfbef74
/*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 = require( '../settings/attachment-display.js' ),
	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;

The same content is in 3 releases, WordPress 4.2-beta1 to 4.2-beta3. See them all, or every version of this file.