mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Move addClass calls to setup in GeneratedContentNodes"
This commit is contained in:
commit
6c377214b1
|
@ -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 );
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue