| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 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 |
} ); |