2013-08-07 06:43:24 +00:00
|
|
|
/*!
|
|
|
|
* 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 */
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.StrikethroughButtonTool.static.name = 'textStyle/strikethrough';
|
2013-08-07 06:43:24 +00:00
|
|
|
|
|
|
|
ve.ui.StrikethroughButtonTool.static.icon = {
|
|
|
|
'default': 'strikethrough-a',
|
|
|
|
'en': 'strikethrough-s'
|
|
|
|
};
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.StrikethroughButtonTool.static.titleMessage =
|
|
|
|
'visualeditor-annotationbutton-strikethrough-tooltip';
|
2013-08-07 06:43:24 +00:00
|
|
|
|
|
|
|
ve.ui.StrikethroughButtonTool.static.annotation = { 'name': 'textStyle/strike' };
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.toolFactory.register( 'textStyle/strikethrough', ve.ui.StrikethroughButtonTool );
|
2013-08-07 06:43:24 +00:00
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
|
|
|
'textStyle/strikethrough', 'annotation', 'toggle', 'textStyle/strike'
|
|
|
|
);
|