mediawiki-extensions-Visual.../modules/ve-mw/ui/tools/ve.ui.MWMediaDialogTool.js
James D. Forrester 4fd4367d6a Update VE core submodule to master (f8a563a)
New changes:
e251898 [BREAKING CHANGE] Allow tools to specify which selection types they support

Local changes:
New requiresSelection api for tools

Change-Id: Idc3f62d60bfb5710f786734c342f71b1c73fd4c0
2014-10-20 12:15:29 -07:00

32 lines
1.2 KiB
JavaScript

/*!
* VisualEditor MediaWiki media dialog tool classes.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* MediaWiki UserInterface media edit tool.
*
* @class
* @extends ve.ui.DialogTool
* @constructor
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
ve.ui.MWMediaDialogTool = function VeUiMWMediaDialogTool( toolGroup, config ) {
ve.ui.DialogTool.call( this, toolGroup, config );
};
OO.inheritClass( ve.ui.MWMediaDialogTool, ve.ui.DialogTool );
ve.ui.MWMediaDialogTool.static.name = 'media';
ve.ui.MWMediaDialogTool.static.group = 'object';
ve.ui.MWMediaDialogTool.static.icon = 'picture';
ve.ui.MWMediaDialogTool.static.title =
OO.ui.deferMsg( 'visualeditor-dialogbutton-media-tooltip' );
ve.ui.MWMediaDialogTool.static.modelClasses = [ ve.dm.MWBlockImageNode, ve.dm.MWInlineImageNode ];
ve.ui.MWMediaDialogTool.static.commandName = 'media';
ve.ui.MWMediaDialogTool.static.requiresSelection = [ 'linear' ];
ve.ui.MWMediaDialogTool.static.autoAddToCatchall = false;
ve.ui.MWMediaDialogTool.static.autoAddToGroup = false;
ve.ui.toolFactory.register( ve.ui.MWMediaDialogTool );