mediawiki-extensions-Visual.../modules/ve-mw/ce/nodes/ve.ce.MWAlienExtensionNode.js
Ed Sanders 18a9f95f5b Use extension name in context menu for alien extensions
We already use this for the inspector title.

Change-Id: Iac157fd3c6f1a23f2bf7b68e2b6ebe55f49a25d5
2014-07-30 14:14:12 +01:00

48 lines
1.1 KiB
JavaScript

/*!
* VisualEditor ContentEditable MWAlienExtensionNode class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable MediaWiki alien extension node.
*
* @class
* @extends ve.ce.MWBlockExtensionNode
*
* @constructor
* @param {ve.dm.MWAlienExtensionNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve.ce.MWAlienExtensionNode = function VeCeMWAlienExtensionNode( model, config ) {
// Parent constructor
ve.ce.MWBlockExtensionNode.call( this, model, config );
// DOM changes
this.$element.addClass( 've-ce-mwAlienExtensionNode' );
};
/* Inheritance */
OO.inheritClass( ve.ce.MWAlienExtensionNode, ve.ce.MWBlockExtensionNode );
/* Static Properties */
ve.ce.MWAlienExtensionNode.static.name = 'mwAlienExtension';
ve.ce.MWAlienExtensionNode.static.primaryCommandName = 'alienExtension';
/* Static Methods */
/**
* @inheritdoc
*/
ve.ce.MWAlienExtensionNode.static.getDescription = function ( model ) {
return model.getExtensionName();
};
/* Registration */
ve.ce.nodeFactory.register( ve.ce.MWAlienExtensionNode );