2015-12-06 22:35:25 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MWMathContextItem class.
|
|
|
|
*
|
|
|
|
* @copyright 2015 VisualEditor Team and others; see http://ve.mit-license.org
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Context item for a math node.
|
|
|
|
*
|
|
|
|
* @class
|
2017-01-11 21:50:35 +00:00
|
|
|
* @extends ve.ui.MWLatexContextItem
|
2015-12-06 22:35:25 +00:00
|
|
|
*
|
|
|
|
* @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 */
|
|
|
|
|
2017-01-11 21:50:35 +00:00
|
|
|
OO.inheritClass( ve.ui.MWMathContextItem, ve.ui.MWLatexContextItem );
|
2015-12-06 22:35:25 +00:00
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ui.MWMathContextItem.static.name = 'math';
|
|
|
|
|
2019-01-23 22:36:14 +00:00
|
|
|
ve.ui.MWMathContextItem.static.icon = 'mathematics';
|
2015-12-06 22:35:25 +00:00
|
|
|
|
2017-01-11 21:50:35 +00:00
|
|
|
ve.ui.MWMathContextItem.static.label = OO.ui.deferMsg( 'math-visualeditor-mwmathdialog-title' );
|
2015-12-06 22:35:25 +00:00
|
|
|
|
|
|
|
ve.ui.MWMathContextItem.static.modelClasses = [ ve.dm.MWMathNode ];
|
|
|
|
|
|
|
|
ve.ui.MWMathContextItem.static.embeddable = false;
|
|
|
|
|
|
|
|
ve.ui.MWMathContextItem.static.commandName = 'mathDialog';
|
|
|
|
|
2017-01-11 21:50:35 +00:00
|
|
|
ve.ui.MWMathContextItem.static.inlineEditCommand = 'mathInspector';
|
2016-09-08 23:19:29 +00:00
|
|
|
|
2015-12-06 22:35:25 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.contextItemFactory.register( ve.ui.MWMathContextItem );
|