2013-06-18 22:58:10 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWMediaEditButtonTool class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2013-07-26 11:04:19 +00:00
|
|
|
* UserInterface MediaWiki media edit button tool.
|
2013-06-18 22:58:10 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.DialogButtonTool
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
|
|
* @param {Object} [config] Config options
|
|
|
|
*/
|
|
|
|
ve.ui.MWMediaEditButtonTool = function VeUiMWMediaEditButtonTool( toolbar, config ) {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.DialogButtonTool.call( this, toolbar, config );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.inheritClass( ve.ui.MWMediaEditButtonTool, ve.ui.DialogButtonTool );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.MWMediaEditButtonTool.static.name = 'object/mediaEdit/mw';
|
2013-06-18 22:58:10 +00:00
|
|
|
|
|
|
|
ve.ui.MWMediaEditButtonTool.static.icon = 'picture';
|
|
|
|
|
|
|
|
ve.ui.MWMediaEditButtonTool.static.titleMessage = 'visualeditor-dialogbutton-media-tooltip';
|
|
|
|
|
|
|
|
ve.ui.MWMediaEditButtonTool.static.dialog = 'mwMediaEdit';
|
|
|
|
|
2013-06-26 21:54:51 +00:00
|
|
|
ve.ui.MWMediaEditButtonTool.static.modelClasses = [ ve.dm.MWBlockImageNode ];
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.MWMediaEditButtonTool.static.autoAdd = false;
|
|
|
|
|
2013-06-18 22:58:10 +00:00
|
|
|
/* Registration */
|
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.ui.toolFactory.register( 'object/mediaEdit/mw', ve.ui.MWMediaEditButtonTool );
|