mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
4bc24e795d
* Introduced MWLinkAction which opens the right link inspector based on what is selected. * Added MWLinkInspectorTool overriding core's 'link' tool that executes MWLinkAction * Removed MWLinkNodeInspectorTool and linkNode command, they're unneeded now Bug: 72150 Change-Id: I03bd6ab1f67f31a6e6cb717cf4298e80e64637b7
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MediaWiki LinkInspectorTool classes.
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* UserInterface link tool. Overrides link tool from core.
|
|
*
|
|
* Works for both link annotations and link nodes, and fires the 'link' command
|
|
* which works for both as well.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.LinkInspectorTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWLinkInspectorTool = function VeUiMWLinkInspectorTool( toolGroup, config ) {
|
|
ve.ui.LinkInspectorTool.call( this, toolGroup, config );
|
|
};
|
|
|
|
OO.inheritClass( ve.ui.MWLinkInspectorTool, ve.ui.LinkInspectorTool );
|
|
|
|
// FIXME should eventually vary title based on link type
|
|
// Use message visualeditor-annotationbutton-linknode-tooltip
|
|
|
|
ve.ui.MWLinkInspectorTool.static.modelClasses =
|
|
ve.ui.MWLinkInspectorTool.super.static.modelClasses.concat( [
|
|
ve.dm.MWNumberedExternalLinkNode
|
|
] );
|
|
|
|
ve.ui.toolFactory.register( ve.ui.MWLinkInspectorTool );
|