Merge "Move addClass calls to setup in GeneratedContentNodes"

This commit is contained in:
jenkins-bot 2014-11-12 23:43:17 +00:00 committed by Gerrit Code Review
commit 6c377214b1
2 changed files with 26 additions and 10 deletions

View file

@ -15,12 +15,9 @@
* @param {ve.dm.MWAlienExtensionNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve.ce.MWAlienExtensionNode = function VeCeMWAlienExtensionNode( model, config ) {
ve.ce.MWAlienExtensionNode = function VeCeMWAlienExtensionNode() {
// Parent constructor
ve.ce.MWBlockExtensionNode.call( this, model, config );
// DOM changes
this.$element.addClass( 've-ce-mwAlienExtensionNode' );
ve.ce.MWAlienExtensionNode.super.apply( this, arguments );
};
/* Inheritance */
@ -42,6 +39,17 @@ ve.ce.MWAlienExtensionNode.static.getDescription = function ( model ) {
return model.getExtensionName();
};
/* Methods */
/**
* @inheritdoc
*/
ve.ce.MWAlienExtensionNode.prototype.onSetup = function () {
ve.ce.MWAlienExtensionNode.super.prototype.onSetup.call( this );
// DOM changes
this.$element.addClass( 've-ce-mwAlienExtensionNode' );
};
/* Registration */
ve.ce.nodeFactory.register( ve.ce.MWAlienExtensionNode );

View file

@ -15,12 +15,9 @@
* @param {ve.dm.MWGalleryNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve.ce.MWGalleryNode = function VeCeMWGalleryNode( model, config ) {
ve.ce.MWGalleryNode = function VeCeMWGalleryNode() {
// Parent constructor
ve.ce.MWBlockExtensionNode.call( this, model, config );
// DOM changes
this.$element.addClass( 've-ce-mwGalleryNode' );
ve.ce.MWGalleryNode.super.apply( this, arguments );
};
/* Inheritance */
@ -37,6 +34,17 @@ ve.ce.MWGalleryNode.static.primaryCommandName = 'gallery';
/* Methods */
/**
* @inheritdoc
*/
ve.ce.MWGalleryNode.prototype.onSetup = function () {
// Parent method
ve.ce.MWGalleryNode.super.prototype.onSetup.call( this );
// DOM changes
this.$element.addClass( 've-ce-mwGalleryNode' );
};
/**
* @inheritdoc ve.ce.GeneratedContentNode
*/