mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
07d56b6b5d
* '{|' for tables * '<!--' for comments * '<gallery' for galleries Change-Id: Ib78c411bf8676bc1974bb80515fd56c642cd67b7
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
/*!
|
|
* VisualEditor MediaWiki UserInterface gallery tool class.
|
|
*
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* MediaWiki UserInterface gallery tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.InspectorTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWGalleryInspectorTool = function VeUiMWGalleryInspectorTool( toolGroup, config ) {
|
|
ve.ui.InspectorTool.call( this, toolGroup, config );
|
|
};
|
|
OO.inheritClass( ve.ui.MWGalleryInspectorTool, ve.ui.InspectorTool );
|
|
ve.ui.MWGalleryInspectorTool.static.name = 'gallery';
|
|
ve.ui.MWGalleryInspectorTool.static.group = 'object';
|
|
ve.ui.MWGalleryInspectorTool.static.icon = 'gallery';
|
|
ve.ui.MWGalleryInspectorTool.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-mwgalleryinspector-title' );
|
|
ve.ui.MWGalleryInspectorTool.static.modelClasses = [ ve.dm.MWGalleryNode ];
|
|
ve.ui.MWGalleryInspectorTool.static.commandName = 'gallery';
|
|
ve.ui.toolFactory.register( ve.ui.MWGalleryInspectorTool );
|
|
|
|
ve.ui.commandRegistry.register(
|
|
new ve.ui.Command(
|
|
'gallery', 'window', 'open',
|
|
{ args: [ 'gallery' ], supportedSelections: [ 'linear' ] }
|
|
)
|
|
);
|
|
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextGallery', 'gallery', '<gallery', 8 )
|
|
);
|