2013-08-07 05:21:10 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor ContentEditable MWAlienExtensionNode class.
|
|
|
|
*
|
2018-01-03 00:54:47 +00:00
|
|
|
* @copyright 2011-2018 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
|
2015-03-23 15:49:38 +00:00
|
|
|
* @abstract
|
2013-08-07 05:21:10 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
*/
|
2016-03-06 16:25:28 +00:00
|
|
|
ve.ce.MWAlienExtensionNode = function VeCeMWAlienExtensionNode() {
|
2013-08-07 05:21:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2015-03-23 15:49:38 +00:00
|
|
|
OO.initClass( ve.ce.MWAlienExtensionNode );
|
2013-08-07 05:21:10 +00:00
|
|
|
|
2015-03-23 15:49:38 +00:00
|
|
|
/* Static members */
|
2013-08-07 05:21:10 +00:00
|
|
|
|
2013-12-20 23:25:24 +00:00
|
|
|
ve.ce.MWAlienExtensionNode.static.primaryCommandName = 'alienExtension';
|
|
|
|
|
2016-03-06 16:25:28 +00:00
|
|
|
ve.ce.MWAlienExtensionNode.static.iconWhenInvisible = 'alienextension';
|
2015-03-20 21:39:54 +00:00
|
|
|
|
2017-10-02 15:20:49 +00:00
|
|
|
ve.ce.MWAlienExtensionNode.static.rendersEmpty = true;
|
|
|
|
|
2016-03-06 16:25:28 +00:00
|
|
|
/* Methods */
|
2014-11-12 19:02:57 +00:00
|
|
|
|
2015-03-23 15:49:38 +00:00
|
|
|
/* Static methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc ve.ce.MWExtensionNode
|
|
|
|
*/
|
|
|
|
ve.ce.MWAlienExtensionNode.static.getDescription = function ( model ) {
|
|
|
|
return model.getExtensionName();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ContentEditable MediaWiki alien inline extension node.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
* @extends ve.ce.MWInlineExtensionNode
|
|
|
|
* @mixins ve.ce.MWAlienExtensionNode
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
|
|
|
ve.ce.MWAlienInlineExtensionNode = function VeCeMWAlienInlineExtensionNode( config ) {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ce.MWAlienInlineExtensionNode.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// Mixin constructors
|
|
|
|
ve.ce.MWAlienExtensionNode.call( this, config );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ce.MWAlienInlineExtensionNode, ve.ce.MWInlineExtensionNode );
|
|
|
|
|
|
|
|
OO.mixinClass( ve.ce.MWAlienInlineExtensionNode, ve.ce.MWAlienExtensionNode );
|
|
|
|
|
|
|
|
/* Static members */
|
|
|
|
|
|
|
|
ve.ce.MWAlienInlineExtensionNode.static.name = 'mwAlienInlineExtension';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ContentEditable MediaWiki alien block extension node.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
* @extends ve.ce.MWBlockExtensionNode
|
|
|
|
* @mixins ve.ce.MWAlienExtensionNode
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.MWAlienBlockExtensionNode} model Model to observe
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
|
|
|
ve.ce.MWAlienBlockExtensionNode = function VeCeMWAlienBlockExtensionNode() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ce.MWAlienBlockExtensionNode.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// Mixin constructors
|
|
|
|
ve.ce.MWAlienExtensionNode.call( this );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ce.MWAlienBlockExtensionNode, ve.ce.MWBlockExtensionNode );
|
|
|
|
|
|
|
|
OO.mixinClass( ve.ce.MWAlienBlockExtensionNode, ve.ce.MWAlienExtensionNode );
|
|
|
|
|
|
|
|
/* Static members */
|
|
|
|
|
|
|
|
ve.ce.MWAlienBlockExtensionNode.static.name = 'mwAlienBlockExtension';
|
|
|
|
|
2013-08-07 05:21:10 +00:00
|
|
|
/* Registration */
|
|
|
|
|
2015-03-23 15:49:38 +00:00
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWAlienInlineExtensionNode );
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWAlienBlockExtensionNode );
|