2017-01-11 21:50:35 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWChemDialogTool class.
|
|
|
|
*
|
2024-03-19 18:37:26 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2018-04-13 14:04:06 +00:00
|
|
|
* @license MIT
|
2017-01-11 21:50:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MediaWiki UserInterface chem tool.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.FragmentWindowTool
|
|
|
|
* @constructor
|
|
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
|
|
|
ve.ui.MWChemDialogTool = function VeUiMWChemDialogTool( toolGroup, config ) {
|
|
|
|
ve.ui.MWChemDialogTool.super.call( this, toolGroup, config );
|
|
|
|
};
|
|
|
|
OO.inheritClass( ve.ui.MWChemDialogTool, ve.ui.FragmentWindowTool );
|
|
|
|
ve.ui.MWChemDialogTool.static.name = 'chem';
|
|
|
|
ve.ui.MWChemDialogTool.static.group = 'object';
|
2019-09-11 20:36:37 +00:00
|
|
|
ve.ui.MWChemDialogTool.static.icon = 'labFlask';
|
2017-01-11 21:50:35 +00:00
|
|
|
ve.ui.MWChemDialogTool.static.title = OO.ui.deferMsg(
|
|
|
|
'math-visualeditor-mwchemdialog-title' );
|
|
|
|
ve.ui.MWChemDialogTool.static.modelClasses = [ ve.dm.MWChemNode ];
|
|
|
|
ve.ui.MWChemDialogTool.static.commandName = 'chemDialog';
|
|
|
|
ve.ui.toolFactory.register( ve.ui.MWChemDialogTool );
|
|
|
|
|
|
|
|
ve.ui.commandRegistry.register(
|
|
|
|
new ve.ui.Command(
|
|
|
|
'chemDialog', 'window', 'open',
|
|
|
|
{ args: [ 'chemDialog' ], supportedSelections: [ 'linear' ] }
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
ve.ui.commandRegistry.register(
|
|
|
|
new ve.ui.Command(
|
|
|
|
'chemInspector', 'window', 'open',
|
|
|
|
{ args: [ 'chemInspector' ], supportedSelections: [ 'linear' ] }
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
ve.ui.sequenceRegistry.register(
|
|
|
|
new ve.ui.Sequence( 'wikitextChem', 'chemDialog', '<chem', 5 )
|
|
|
|
);
|
|
|
|
|
|
|
|
ve.ui.commandHelpRegistry.register( 'insert', 'chemDialog', {
|
|
|
|
sequences: [ 'wikitextChem' ],
|
|
|
|
label: OO.ui.deferMsg( 'math-visualeditor-mwchemdialog-title' )
|
|
|
|
} );
|