Debian Codegraph @

extensions/Math/modules/ve-math/ve.ui.MWMathDialogTool.js

raw symbols SCIP
1 /*!
2 * VisualEditor UserInterface MWMathDialogTool class.
3 *
4 * @copyright See AUTHORS.txt
5 * @license MIT
6 */
7
8 /**
9 * MediaWiki UserInterface math tool.
10 *
11 * @class
12 * @extends ve.ui.FragmentWindowTool
13 * @constructor
14 * @param {OO.ui.ToolGroup} toolGroup
15 * @param {Object} [config] Configuration options
16 */
17 ve.ui.MWMathDialogTool = function VeUiMWMathDialogTool( toolGroup, config ) {
18 ve.ui.MWMathDialogTool.super.call( this, toolGroup, config );
19 };
20 OO.inheritClass( ve.ui.MWMathDialogTool, ve.ui.FragmentWindowTool );
21 ve.ui.MWMathDialogTool.static.name = 'math';
22 ve.ui.MWMathDialogTool.static.group = 'object';
23 ve.ui.MWMathDialogTool.static.icon = 'mathematics';
24 ve.ui.MWMathDialogTool.static.title = OO.ui.deferMsg(
25 'math-visualeditor-mwmathdialog-title' );
26 ve.ui.MWMathDialogTool.static.modelClasses = [ ve.dm.MWMathNode ];
27 ve.ui.MWMathDialogTool.static.commandName = 'mathDialog';
28 ve.ui.toolFactory.register( ve.ui.MWMathDialogTool );
29
30 ve.ui.commandRegistry.register(
31 new ve.ui.Command(
32 'mathDialog', 'window', 'open',
33 { args: [ 'mathDialog' ], supportedSelections: [ 'linear' ] }
34 )
35 );
36
37 ve.ui.commandRegistry.register(
38 new ve.ui.Command(
39 'mathInspector', 'window', 'open',
40 { args: [ 'mathInspector' ], supportedSelections: [ 'linear' ] }
41 )
42 );
43
44 ve.ui.sequenceRegistry.register(
45 new ve.ui.Sequence( 'wikitextMath', 'mathDialog', '<math', 5 )
46 );
47
48 ve.ui.commandHelpRegistry.register( 'insert', 'mathDialog', {
49 sequences: [ 'wikitextMath' ],
50 label: OO.ui.deferMsg( 'math-visualeditor-mwmathdialog-title' )
51 } );