mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
1d6085b801
New changes: 61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms e5aff79 Localisation updates from https://translatewiki.net. a99a897 Update OOjs UI to v0.12.3 3c01a14 Make DM nodes sensibly hashable a611eb9 Make ve.dm.example.postprocessAnnotations fluent 496c895 Update ve.dm.ElementLinearData#hasContent documentation fcaa035 Support RegExp sequences; trigger sequence matcher after newline edda1d4 Add a mechanism to wait until ve.init.platform has been created e174155 Autolink URLs when typing ac9248f Allow drag and drop of links (and subsequent autolinking) c88fad6 Localisation updates from https://translatewiki.net. Local changes: * Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`. * Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`. * Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper `ve.ui.MWExternalLinkAnnotation` type. Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MediaWiki LinkInspectorTool classes.
|
|
*
|
|
* @copyright 2011-2015 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() {
|
|
ve.ui.MWLinkInspectorTool.super.apply( this, arguments );
|
|
};
|
|
|
|
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.MWLinkInspectorTool.static.associatedWindows = [ 'link', 'linkNode' ];
|
|
|
|
ve.ui.toolFactory.register( ve.ui.MWLinkInspectorTool );
|
|
|
|
ve.ui.commandRegistry.register(
|
|
new ve.ui.Command(
|
|
'link', 'link', 'open', { supportedSelections: [ 'linear' ] }
|
|
)
|
|
);
|