mediawiki-extensions-Visual.../modules/ve-mw/ui/tools/ve.ui.MWGalleryInspectorTool.js
Ed Sanders e1d14099e0 Image/gallery icons: Rename and use new upstream versions
Depends on oojs-ui > 0.13.2.

Change-Id: Iee4cc52b998626e829fd92346d5ee1295c08f26f
2015-11-18 01:49:31 +00:00

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 = 'imageGallery';
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 )
);