mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-30 18:35:12 +00:00
848d762e24
The chemical and mathematical formula inspectors and dialogs have a lot of similar functionality, and the common parts are now moved to the common MWLatex class. MWMath* classes now inherit from MWLatex*, and so do the new MWChem* classes. Bug: T153365 Change-Id: I4452ceca55197fda5f1e1293a5741c6f5fb7c245
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor MWMathContextItem class.
|
|
*
|
|
* @copyright 2015 VisualEditor Team and others; see http://ve.mit-license.org
|
|
*/
|
|
|
|
/**
|
|
* Context item for a math node.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.MWLatexContextItem
|
|
*
|
|
* @param {ve.ui.Context} context Context item is in
|
|
* @param {ve.dm.Model} model Model item is related to
|
|
* @param {Object} config Configuration options
|
|
*/
|
|
ve.ui.MWMathContextItem = function VeUiMWMathContextItem() {
|
|
// Parent constructor
|
|
ve.ui.MWMathContextItem.super.apply( this, arguments );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWMathContextItem, ve.ui.MWLatexContextItem );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWMathContextItem.static.name = 'math';
|
|
|
|
ve.ui.MWMathContextItem.static.icon = 'math';
|
|
|
|
ve.ui.MWMathContextItem.static.label = OO.ui.deferMsg( 'math-visualeditor-mwmathdialog-title' );
|
|
|
|
ve.ui.MWMathContextItem.static.modelClasses = [ ve.dm.MWMathNode ];
|
|
|
|
ve.ui.MWMathContextItem.static.embeddable = false;
|
|
|
|
ve.ui.MWMathContextItem.static.commandName = 'mathDialog';
|
|
|
|
ve.ui.MWMathContextItem.static.inlineEditCommand = 'mathInspector';
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.contextItemFactory.register( ve.ui.MWMathContextItem );
|