2013-07-03 21:44:15 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWMathInspector class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MediaWiki math inspector.
|
|
|
|
*
|
|
|
|
* @class
|
2013-08-03 14:17:16 +00:00
|
|
|
* @extends ve.ui.MWExtensionInspector
|
2013-07-03 21:44:15 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.ui.Surface} surface
|
|
|
|
* @param {Object} [config] Config options
|
|
|
|
*/
|
|
|
|
ve.ui.MWMathInspector = function VeUiMWMathInspector( surface, config ) {
|
|
|
|
// Parent constructor
|
2013-08-03 14:17:16 +00:00
|
|
|
ve.ui.MWExtensionInspector.call( this, surface, config );
|
2013-07-03 21:44:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2013-08-03 14:17:16 +00:00
|
|
|
ve.inheritClass( ve.ui.MWMathInspector, ve.ui.MWExtensionInspector );
|
2013-07-03 21:44:15 +00:00
|
|
|
|
|
|
|
/* Static properties */
|
|
|
|
|
2013-07-18 22:48:21 +00:00
|
|
|
ve.ui.MWMathInspector.static.icon = 'math';
|
2013-07-03 21:44:15 +00:00
|
|
|
|
|
|
|
ve.ui.MWMathInspector.static.titleMessage = 'visualeditor-mwmathinspector-title';
|
|
|
|
|
2013-08-03 14:17:16 +00:00
|
|
|
ve.ui.MWMathInspector.static.nodeView = ve.ce.MWMathNode;
|
|
|
|
|
|
|
|
ve.ui.MWMathInspector.static.nodeModel = ve.dm.MWMathNode;
|
|
|
|
|
2013-07-03 21:44:15 +00:00
|
|
|
/* Methods */
|
|
|
|
|
2013-08-03 14:17:16 +00:00
|
|
|
/** */
|
2013-07-03 21:44:15 +00:00
|
|
|
ve.ui.MWMathInspector.prototype.initialize = function () {
|
|
|
|
// Parent method
|
2013-08-03 14:17:16 +00:00
|
|
|
ve.ui.MWExtensionInspector.prototype.initialize.call( this );
|
2013-07-03 21:44:15 +00:00
|
|
|
|
2013-07-19 22:30:29 +00:00
|
|
|
this.input.$.addClass( 've-ui-mwMathInspector-input' );
|
2013-07-03 21:44:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.inspectorFactory.register( 'mwMathInspector', ve.ui.MWMathInspector );
|