2014-01-15 03:04:58 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MediaWiki UserInterface gallery tool class.
|
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2014-01-15 03:04:58 +00:00
|
|
|
* @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';
|
2014-02-12 21:45:37 +00:00
|
|
|
ve.ui.MWGalleryInspectorTool.static.title =
|
|
|
|
OO.ui.deferMsg( 'visualeditor-mwgalleryinspector-title' );
|
2014-01-15 03:04:58 +00:00
|
|
|
ve.ui.MWGalleryInspectorTool.static.modelClasses = [ ve.dm.MWGalleryNode ];
|
2014-04-02 23:29:04 +00:00
|
|
|
ve.ui.MWGalleryInspectorTool.static.commandName = 'gallery';
|
2014-01-15 03:04:58 +00:00
|
|
|
ve.ui.toolFactory.register( ve.ui.MWGalleryInspectorTool );
|
2015-08-02 11:24:15 +00:00
|
|
|
|
|
|
|
ve.ui.commandRegistry.register(
|
|
|
|
new ve.ui.Command(
|
|
|
|
'gallery', 'window', 'open',
|
|
|
|
{ args: [ 'gallery' ], supportedSelections: [ 'linear' ] }
|
|
|
|
)
|
|
|
|
);
|
2015-10-22 14:18:45 +00:00
|
|
|
|
|
|
|
ve.ui.sequenceRegistry.register(
|
|
|
|
new ve.ui.Sequence( 'wikitextGallery', 'gallery', '<gallery', 8 )
|
|
|
|
);
|