mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Remove link node inspector from insert menu
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
This commit is contained in:
parent
98f403f237
commit
172ebb839e
|
@ -540,8 +540,6 @@ $wgResourceModules += array(
|
|||
'visualeditor-inspector-close-tooltip',
|
||||
'visualeditor-inspector-remove-tooltip',
|
||||
'visualeditor-linkinspector-title',
|
||||
'visualeditor-linknodeinspector-title',
|
||||
'visualeditor-linknodeinspector-add-label',
|
||||
'visualeditor-listbutton-bullet-tooltip',
|
||||
'visualeditor-listbutton-number-tooltip',
|
||||
'visualeditor-mediasizewidget-button-originaldimensions',
|
||||
|
@ -838,12 +836,15 @@ $wgResourceModules += array(
|
|||
'ext.visualEditor.mwcore',
|
||||
),
|
||||
'messages' => array(
|
||||
'visualeditor-annotationbutton-linknode-tooltip',
|
||||
'visualeditor-linkinspector-illegal-title',
|
||||
'visualeditor-linkinspector-suggest-external-link',
|
||||
'visualeditor-linkinspector-suggest-matching-page',
|
||||
'visualeditor-linkinspector-suggest-disambig-page',
|
||||
'visualeditor-linkinspector-suggest-redirect-page',
|
||||
'visualeditor-linkinspector-suggest-new-page',
|
||||
'visualeditor-linknodeinspector-title',
|
||||
'visualeditor-linknodeinspector-add-label',
|
||||
),
|
||||
'targets' => array( 'desktop', 'mobile' ),
|
||||
),
|
||||
|
|
|
@ -33,6 +33,7 @@ ve.ce.MWNumberedExternalLinkNode = function VeCeMWNumberedExternalLinkNode( mode
|
|||
this.$link = this.$( '<a>' )
|
||||
// CSS for numbering needs rel=mw:ExtLink
|
||||
.attr( 'rel', 'mw:ExtLink' )
|
||||
.addClass( 'external' )
|
||||
.appendTo( this.$element );
|
||||
|
||||
// Events
|
||||
|
@ -56,7 +57,7 @@ ve.ce.MWNumberedExternalLinkNode.static.name = 'link/mwNumberedExternal';
|
|||
|
||||
ve.ce.MWNumberedExternalLinkNode.static.tagName = 'span';
|
||||
|
||||
ve.ce.MWNumberedExternalLinkNode.static.primaryCommandName = 'link';
|
||||
ve.ce.MWNumberedExternalLinkNode.static.primaryCommandName = 'linkNode';
|
||||
|
||||
/* Methods */
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"tooltip-ca-editsource": "Edit the source code of this page",
|
||||
"tooltip-ca-ve-edit": "Edit this page with VisualEditor",
|
||||
"visualeditor-advancedsettings-tool": "Advanced settings",
|
||||
"visualeditor-annotationbutton-linknode-tooltip": "Simple link",
|
||||
"visualeditor-beta-appendix": "beta",
|
||||
"visualeditor-beta-label": "beta",
|
||||
"visualeditor-beta-warning": "VisualEditor is in 'beta'. You may encounter software issues, and you may not be able to edit parts of the page. To switch back to source editing at any time without losing your changes, open the dropdown next to \"{{int:visualeditor-toolbar-cancel}}\" and select \"{{int:visualeditor-mweditmodesource-title}}\".",
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"tooltip-ca-editsource": "Tooltip of the {{msg-mw|Visualeditor-ca-editsource}} tab, used if the page already exists.\n\nSee also:\n* {{msg-mw|Tooltip-ca-createsource}} - tooltip of the {{msg-mw|Visualeditor-ca-createsource}} tab, used if the page does not exist",
|
||||
"tooltip-ca-ve-edit": "Tooltip of the dedicated VisualEditor \"Edit\" tab.",
|
||||
"visualeditor-advancedsettings-tool": "Tool for opening the advanced settings section of the meta dialog.\n{{Identical|Advanced settings}}",
|
||||
"visualeditor-annotationbutton-linknode-tooltip": "Tooltip text for link button for auto-numbered, labelless, external links.\n{{Related|Visualeditor-annotationbutton}}\n{{Related|visualeditor-linknodeinspector-title}}",
|
||||
"visualeditor-beta-appendix": "Used in {{msg-mw|Guidedtour-tour-firsteditve-edit-page-description}}.\n{{Identical|Beta}}",
|
||||
"visualeditor-beta-label": "Text of tool in the toolbar that highlights that VisualEditor is still in beta.\n{{Identical|Beta}}",
|
||||
"visualeditor-beta-warning": "Note shown when user clicks on 'beta' label in VisualEditor, warning users that the software may have issues.\n\nRefers to:\n* {{msg-mw|Visualeditor-toolbar-cancel}}\n* {{msg-mw|Visualeditor-mweditmodesource-title}}\nSee also:\n* {{msg-mw|Visualeditor-wikitext-warning}}",
|
||||
|
|
|
@ -19,6 +19,10 @@ ve.ui.MWLinkNodeInspectorTool = function VeUiMWLinkNodeInspectorTool( toolGroup,
|
|||
};
|
||||
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 );
|
||||
|
|
Loading…
Reference in a new issue