mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
fef33d30ec
Note currently a blank icon appears to the left of this. This will need to be removed later. Change-Id: Ia8be1f0e83a2154a48de3c3a47bd8feb0c9a2a2c
78 lines
3.3 KiB
JavaScript
78 lines
3.3 KiB
JavaScript
/*!
|
|
* VisualEditor MediaWiki Reference dialog tool classes.
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* MediaWiki UserInterface reference tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWReferenceDialogTool = function VeUiMWReferenceDialogTool( toolGroup, config ) {
|
|
ve.ui.DialogTool.call( this, toolGroup, config );
|
|
};
|
|
OO.inheritClass( ve.ui.MWReferenceDialogTool, ve.ui.DialogTool );
|
|
ve.ui.MWReferenceDialogTool.static.name = 'reference';
|
|
ve.ui.MWReferenceDialogTool.static.group = 'object';
|
|
ve.ui.MWReferenceDialogTool.static.icon = 'reference';
|
|
ve.ui.MWReferenceDialogTool.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-dialogbutton-reference-tooltip' );
|
|
ve.ui.MWReferenceDialogTool.static.modelClasses = [ ve.dm.MWReferenceNode ];
|
|
ve.ui.MWReferenceDialogTool.static.commandName = 'reference';
|
|
ve.ui.MWReferenceDialogTool.static.requiresRange = true;
|
|
ve.ui.toolFactory.register( ve.ui.MWReferenceDialogTool );
|
|
|
|
/**
|
|
* MediaWiki UserInterface use existing reference tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWUseExistingReferenceDialogTool = function VeUiMWUseExistingReferenceDialogTool( toolGroup, config ) {
|
|
ve.ui.DialogTool.call( this, toolGroup, config );
|
|
};
|
|
OO.inheritClass( ve.ui.MWUseExistingReferenceDialogTool, ve.ui.DialogTool );
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.name = 'reference/existing';
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.group = 'object';
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.icon = 'reference-existing';
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-dialog-reference-useexisting-label' );
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.modelClasses = [];
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.commandName = 'reference/existing';
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.requiresRange = true;
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.autoAddToGroup = false;
|
|
ve.ui.MWUseExistingReferenceDialogTool.static.autoAddToCatchall = false;
|
|
ve.ui.toolFactory.register( ve.ui.MWUseExistingReferenceDialogTool );
|
|
|
|
/**
|
|
* MediaWiki UserInterface reference list tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWReferenceListDialogTool = function VeUiMWReferenceListDialogTool( toolGroup, config ) {
|
|
ve.ui.DialogTool.call( this, toolGroup, config );
|
|
};
|
|
OO.inheritClass( ve.ui.MWReferenceListDialogTool, ve.ui.DialogTool );
|
|
ve.ui.MWReferenceListDialogTool.static.name = 'referenceList';
|
|
ve.ui.MWReferenceListDialogTool.static.group = 'object';
|
|
ve.ui.MWReferenceListDialogTool.static.icon = 'references';
|
|
ve.ui.MWReferenceListDialogTool.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-dialogbutton-referencelist-tooltip' );
|
|
ve.ui.MWReferenceListDialogTool.static.modelClasses = [ ve.dm.MWReferenceListNode ];
|
|
ve.ui.MWReferenceListDialogTool.static.commandName = 'referenceList';
|
|
ve.ui.MWReferenceListDialogTool.static.requiresRange = true;
|
|
ve.ui.toolFactory.register( ve.ui.MWReferenceListDialogTool );
|