mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-02 01:46:47 +00:00
0d1617a627
Mostly as a demonstration of how easy this is with MWExtensionNode. The icon was chosen with the following criteria: 1. Recognisable (the ankh is quite common in popular culture, right?) 2. Doesn't look idiotic to academics (I've consulted an Egyptology PhD and they can confirm it's not the glyph for penis) 3. Renders well at <16x16 That said it does look a little like a stick man... Bug: 43118 Change-Id: I9f9e8af501401866bfeecf0eec3690a705fbd4db
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWHieroButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* UserInterface MediaWiki hieroglyphics button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.InspectorButtonTool
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.MWHieroButtonTool = function VeUiMWHieroButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.InspectorButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.MWHieroButtonTool, ve.ui.InspectorButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWHieroButtonTool.static.name = 'mwHiero';
|
|
|
|
ve.ui.MWHieroButtonTool.static.icon = 'hiero';
|
|
|
|
ve.ui.MWHieroButtonTool.static.titleMessage = 'visualeditor-mwhieroinspector-title';
|
|
|
|
ve.ui.MWHieroButtonTool.static.inspector = 'mwHieroInspector';
|
|
|
|
ve.ui.MWHieroButtonTool.static.modelClasses = [ ve.dm.MWHieroNode ];
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'mwHiero', ve.ui.MWHieroButtonTool );
|