2013-08-07 05:21:10 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor ContentEditable MWAlienExtensionNode class.
|
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2013-08-07 05:21:10 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ContentEditable MediaWiki alien extension node.
|
|
|
|
*
|
|
|
|
* @class
|
2014-05-20 11:56:37 +00:00
|
|
|
* @extends ve.ce.MWBlockExtensionNode
|
2013-08-07 05:21:10 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.MWAlienExtensionNode} model Model to observe
|
2013-09-25 10:21:09 +00:00
|
|
|
* @param {Object} [config] Configuration options
|
2013-08-07 05:21:10 +00:00
|
|
|
*/
|
2014-11-12 19:02:57 +00:00
|
|
|
ve.ce.MWAlienExtensionNode = function VeCeMWAlienExtensionNode() {
|
2013-08-07 05:21:10 +00:00
|
|
|
// Parent constructor
|
2014-11-12 19:02:57 +00:00
|
|
|
ve.ce.MWAlienExtensionNode.super.apply( this, arguments );
|
2013-08-07 05:21:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2014-05-20 11:56:37 +00:00
|
|
|
OO.inheritClass( ve.ce.MWAlienExtensionNode, ve.ce.MWBlockExtensionNode );
|
2013-08-07 05:21:10 +00:00
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ce.MWAlienExtensionNode.static.name = 'mwAlienExtension';
|
|
|
|
|
2013-12-20 23:25:24 +00:00
|
|
|
ve.ce.MWAlienExtensionNode.static.primaryCommandName = 'alienExtension';
|
|
|
|
|
2014-07-30 13:14:12 +00:00
|
|
|
/* Static Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ce.MWAlienExtensionNode.static.getDescription = function ( model ) {
|
|
|
|
return model.getExtensionName();
|
|
|
|
};
|
|
|
|
|
2014-11-12 19:02:57 +00:00
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ce.MWAlienExtensionNode.prototype.onSetup = function () {
|
|
|
|
ve.ce.MWAlienExtensionNode.super.prototype.onSetup.call( this );
|
|
|
|
// DOM changes
|
|
|
|
this.$element.addClass( 've-ce-mwAlienExtensionNode' );
|
|
|
|
};
|
|
|
|
|
2013-08-07 05:21:10 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWAlienExtensionNode );
|