mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-11 05:56:11 +00:00
172ebb839e
This inspector isn't designed for insertion mode yet; attempting to use it in insertion mode causes nasty JS errors. Bonus: * Make its tool title "Simple link" rather than "Link", for when we do reintroduce it. * Make double-clicking / pressing enter while selecting a link node open the link node inspector rather than the link annotation inspector. * Make link nodes render with MW's external link arrow icon * Move the link node inspector's messages to the right RL module Bug: 66047 Change-Id: Ib94da7ed3a2a88297dbdd1529f20cd8dab7c8421
29 lines
1.1 KiB
JavaScript
29 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.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.LinkInspectorTool
|
|
* @constructor
|
|
* @param {OO.ui.ToolGroup} toolGroup
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWLinkNodeInspectorTool = function VeUiMWLinkNodeInspectorTool( toolGroup, config ) {
|
|
ve.ui.LinkInspectorTool.call( this, toolGroup, config );
|
|
};
|
|
OO.inheritClass( ve.ui.MWLinkNodeInspectorTool, ve.ui.LinkInspectorTool );
|
|
ve.ui.MWLinkNodeInspectorTool.static.name = 'linkNode';
|
|
ve.ui.MWLinkNodeInspectorTool.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-annotationbutton-linknode-tooltip' );
|
|
ve.ui.MWLinkNodeInspectorTool.static.modelClasses = [ ve.dm.MWNumberedExternalLinkNode ];
|
|
ve.ui.MWLinkNodeInspectorTool.static.commandName = 'linkNode';
|
|
ve.ui.MWLinkNodeInspectorTool.static.autoAddToGroup = false;
|
|
ve.ui.MWLinkNodeInspectorTool.static.autoAddToCatchall = false;
|
|
ve.ui.toolFactory.register( ve.ui.MWLinkNodeInspectorTool );
|