2017-01-11 21:50:35 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MWChemContextItem class.
|
|
|
|
*
|
|
|
|
* @copyright 2015 VisualEditor Team and others; see http://ve.mit-license.org
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Context item for a chem node.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.MWLatexContextItem
|
|
|
|
*
|
2023-07-10 13:33:51 +00:00
|
|
|
* @param {ve.ui.LinearContext} context Context the item is in
|
|
|
|
* @param {ve.dm.Model} model Model the item is related to
|
2017-01-11 21:50:35 +00:00
|
|
|
* @param {Object} config Configuration options
|
|
|
|
*/
|
|
|
|
ve.ui.MWChemContextItem = function VeUiMWChemContextItem() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.MWChemContextItem.super.apply( this, arguments );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWChemContextItem, ve.ui.MWLatexContextItem );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.name = 'chem';
|
|
|
|
|
2019-09-11 20:36:37 +00:00
|
|
|
ve.ui.MWChemContextItem.static.icon = 'labFlask';
|
2017-01-11 21:50:35 +00:00
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.label = OO.ui.deferMsg( 'math-visualeditor-mwchemdialog-title' );
|
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.modelClasses = [ ve.dm.MWChemNode ];
|
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.embeddable = false;
|
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.commandName = 'chemDialog';
|
|
|
|
|
|
|
|
ve.ui.MWChemContextItem.static.inlineEditCommand = 'chemInspector';
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.contextItemFactory.register( ve.ui.MWChemContextItem );
|