Debian Codegraph @

extensions/SyntaxHighlight_GeSHi/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js

raw symbols SCIP
1 /*!
2 * VisualEditor UserInterface MWSyntaxHighlightDialogTool class.
3 *
4 * @copyright VisualEditor Team and others
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7
8 /**
9 * MediaWiki UserInterface syntax highlight tool.
10 *
11 * @class
12 * @extends ve.ui.FragmentWindowTool
13 * @constructor
14 * @param {OO.ui.ToolGroup} toolGroup
15 * @param {Object} [config] Configuration options
16 */
17 ve.ui.MWSyntaxHighlightDialogTool = function VeUiMWSyntaxHighlightDialogTool() {
18 ve.ui.MWSyntaxHighlightDialogTool.super.apply( this, arguments );
19 };
20 OO.inheritClass( ve.ui.MWSyntaxHighlightDialogTool, ve.ui.FragmentWindowTool );
21 ve.ui.MWSyntaxHighlightDialogTool.static.name = 'syntaxhighlightDialog';
22 ve.ui.MWSyntaxHighlightDialogTool.static.group = 'object';
23 ve.ui.MWSyntaxHighlightDialogTool.static.icon = 'markup';
24 ve.ui.MWSyntaxHighlightDialogTool.static.title = OO.ui.deferMsg(
25 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' );
26 ve.ui.MWSyntaxHighlightDialogTool.static.modelClasses = [ ve.dm.MWBlockSyntaxHighlightNode ];
27 ve.ui.MWSyntaxHighlightDialogTool.static.commandName = 'syntaxhighlightDialog';
28 ve.ui.toolFactory.register( ve.ui.MWSyntaxHighlightDialogTool );
29
30 ve.ui.commandRegistry.register(
31 new ve.ui.Command(
32 'syntaxhighlightDialog', 'window', 'open',
33 { args: [ 'syntaxhighlightDialog' ], supportedSelections: [ 'linear' ] }
34 )
35 );
36
37 ve.ui.sequenceRegistry.register(
38 // Don't wait for the user to type out the full <syntaxhighlight> tag
39 new ve.ui.Sequence( 'wikitextSyntax', 'syntaxhighlightDialog', '<syntax', 7 )
40 );
41
42 ve.ui.sequenceRegistry.register(
43 new ve.ui.Sequence( 'wikitextSource', 'syntaxhighlightDialog', '<source', 7 )
44 );
45
46 ve.ui.commandHelpRegistry.register( 'insert', 'syntax', {
47 sequences: [ 'wikitextSyntax', 'wikitextSource' ],
48 label: OO.ui.deferMsg( 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' )
49 } );