mediawiki-extensions-Visual.../modules/ve/ui/tools/buttons/ve.ui.StrikethroughButtonTool.js
peter-coti 5014e122e3 Create strikethrough text style button
Experimental to avoid making toolbar too long

Bug: 51610
Change-Id: I1eb5b1361d6058a6e1533ab62c0aa7e21c9fc090
2013-08-07 16:14:19 +08:00

44 lines
1.2 KiB
JavaScript

/*!
* VisualEditor UserInterface StrikethroughButtonTool class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* UserInterface code button tool.
*
* @class
* @extends ve.ui.AnnotationButtonTool
* @constructor
* @param {ve.ui.SurfaceToolbar} toolbar
* @param {Object} [config] Config options
*/
ve.ui.StrikethroughButtonTool = function VeUiStrikethroughButtonTool( toolbar, config ) {
// Parent constructor
ve.ui.AnnotationButtonTool.call( this, toolbar, config );
};
/* Inheritance */
ve.inheritClass( ve.ui.StrikethroughButtonTool, ve.ui.AnnotationButtonTool );
/* Static Properties */
ve.ui.StrikethroughButtonTool.static.name = 'strikethrough';
ve.ui.StrikethroughButtonTool.static.icon = {
'default': 'strikethrough-a',
'en': 'strikethrough-s'
};
ve.ui.StrikethroughButtonTool.static.titleMessage = 'visualeditor-annotationbutton-strikethrough-tooltip';
ve.ui.StrikethroughButtonTool.static.annotation = { 'name': 'textStyle/strike' };
/* Registration */
ve.ui.toolFactory.register( 'strikethrough', ve.ui.StrikethroughButtonTool );
ve.ui.commandRegistry.register( 'strikethrough', 'annotation', 'toggle', 'textStyle/strike' );