2014-02-27 15:17:00 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MediaWiki media dialog tool classes.
|
|
|
|
*
|
2020-01-08 17:13:04 +00:00
|
|
|
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
2014-02-27 15:17:00 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MediaWiki UserInterface media edit tool.
|
|
|
|
*
|
|
|
|
* @class
|
2015-12-08 13:18:51 +00:00
|
|
|
* @extends ve.ui.FragmentWindowTool
|
2014-02-27 15:17:00 +00:00
|
|
|
* @constructor
|
|
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
2015-12-08 13:18:51 +00:00
|
|
|
ve.ui.MWMediaDialogTool = function VeUiMWMediaDialogTool() {
|
|
|
|
ve.ui.MWMediaDialogTool.super.apply( this, arguments );
|
2014-02-27 15:17:00 +00:00
|
|
|
};
|
2015-12-08 13:18:51 +00:00
|
|
|
OO.inheritClass( ve.ui.MWMediaDialogTool, ve.ui.FragmentWindowTool );
|
2014-06-19 15:44:05 +00:00
|
|
|
ve.ui.MWMediaDialogTool.static.name = 'media';
|
|
|
|
ve.ui.MWMediaDialogTool.static.group = 'object';
|
2015-11-11 20:18:18 +00:00
|
|
|
ve.ui.MWMediaDialogTool.static.icon = 'image';
|
2014-06-19 15:44:05 +00:00
|
|
|
ve.ui.MWMediaDialogTool.static.title =
|
2014-02-27 15:17:00 +00:00
|
|
|
OO.ui.deferMsg( 'visualeditor-dialogbutton-media-tooltip' );
|
2014-06-19 15:44:05 +00:00
|
|
|
ve.ui.MWMediaDialogTool.static.modelClasses = [ ve.dm.MWBlockImageNode, ve.dm.MWInlineImageNode ];
|
|
|
|
ve.ui.MWMediaDialogTool.static.commandName = 'media';
|
|
|
|
ve.ui.MWMediaDialogTool.static.autoAddToCatchall = false;
|
|
|
|
ve.ui.MWMediaDialogTool.static.autoAddToGroup = false;
|
|
|
|
ve.ui.toolFactory.register( ve.ui.MWMediaDialogTool );
|
2015-08-02 11:24:15 +00:00
|
|
|
|
|
|
|
ve.ui.commandRegistry.register(
|
|
|
|
new ve.ui.Command(
|
|
|
|
'media', 'window', 'open',
|
|
|
|
{ args: [ 'media' ], supportedSelections: [ 'linear' ] }
|
|
|
|
)
|
|
|
|
);
|