jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (e61ebf2)
......................................................................


Update VE core submodule to master (e61ebf2)

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
---
M .jsduck/eg-iframe.html
M VisualEditor.hooks.php
M extension.json
M lib/ve
M modules/ve-mw/init/ve.init.mw.Platform.js
M modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
M modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js
7 files changed, 28 insertions(+), 7 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 3e4949d..86d25d9 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -344,6 +344,7 @@
                <script 
src="lib/ve/src/ui/actions/ve.ui.FormatAction.js"></script>
                <script 
src="lib/ve/src/ui/actions/ve.ui.HistoryAction.js"></script>
                <script 
src="lib/ve/src/ui/actions/ve.ui.IndentationAction.js"></script>
+               <script 
src="lib/ve/src/ui/actions/ve.ui.LinkAction.js"></script>
                <script 
src="lib/ve/src/ui/actions/ve.ui.ListAction.js"></script>
                <script 
src="lib/ve/src/ui/actions/ve.ui.TableAction.js"></script>
                <script 
src="lib/ve/src/ui/actions/ve.ui.WindowAction.js"></script>
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 0a822d8..6744e25 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -605,6 +605,7 @@
                                
'lib/ve/tests/ui/actions/ve.ui.FormatAction.test.js',
                                
'modules/ve-mw/tests/ui/actions/ve.ui.FormatAction.test.js',
                                
'lib/ve/tests/ui/actions/ve.ui.IndentationAction.test.js',
+                               
'lib/ve/tests/ui/actions/ve.ui.LinkAction.test.js',
                                
'lib/ve/tests/ui/actions/ve.ui.ListAction.test.js',
                                // VisualEditor initialization Tests
                                'lib/ve/tests/init/ve.init.Platform.test.js',
diff --git a/extension.json b/extension.json
index 3995366..2a8ad92 100644
--- a/extension.json
+++ b/extension.json
@@ -661,6 +661,7 @@
                                "lib/ve/src/ui/actions/ve.ui.FormatAction.js",
                                "lib/ve/src/ui/actions/ve.ui.HistoryAction.js",
                                
"lib/ve/src/ui/actions/ve.ui.IndentationAction.js",
+                               "lib/ve/src/ui/actions/ve.ui.LinkAction.js",
                                "lib/ve/src/ui/actions/ve.ui.ListAction.js",
                                "lib/ve/src/ui/actions/ve.ui.TableAction.js",
                                "lib/ve/src/ui/actions/ve.ui.WindowAction.js",
diff --git a/lib/ve b/lib/ve
index d3d2293..e61ebf2 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit d3d2293adc014772eb7b43c6197ad3bbd8e5c351
+Subproject commit e61ebf267a4fd687d91536f15601d67e805b666b
diff --git a/modules/ve-mw/init/ve.init.mw.Platform.js 
b/modules/ve-mw/init/ve.init.mw.Platform.js
index 7735957..0ea765f 100644
--- a/modules/ve-mw/init/ve.init.mw.Platform.js
+++ b/modules/ve-mw/init/ve.init.mw.Platform.js
@@ -21,6 +21,9 @@
        this.externalLinkUrlProtocolsRegExp = new RegExp(
                '^(' + mw.config.get( 'wgUrlProtocols' ) + ')'
        );
+       this.unanchoredExternalLinkUrlProtocolsRegExp = new RegExp(
+               '(' + mw.config.get( 'wgUrlProtocols' ) + ')'
+       );
        this.parsedMessages = {};
        this.linkCache = new ve.init.mw.LinkCache();
        this.imageInfoCache = new ve.init.mw.ImageInfoCache();
@@ -38,6 +41,11 @@
 };
 
 /** @inheritdoc */
+ve.init.mw.Platform.prototype.getUnanchoredExternalLinkUrlProtocolsRegExp = 
function () {
+       return this.unanchoredExternalLinkUrlProtocolsRegExp;
+};
+
+/** @inheritdoc */
 ve.init.mw.Platform.prototype.addMessages = function ( messages ) {
        return mw.messages.set( messages );
 };
diff --git a/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js 
b/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
index 2d955b0..53405ff 100644
--- a/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
+++ b/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
@@ -10,22 +10,20 @@
  * Opens either MWLinkAnnotationInspector or MWLinkNodeInspector depending on 
what is selected.
  *
  * @class
- * @extends ve.ui.Action
+ * @extends ve.ui.LinkAction
  * @constructor
  * @param {ve.ui.Surface} surface Surface to act on
  */
 ve.ui.MWLinkAction = function VeUiMWLinkAction( surface ) {
        // Parent constructor
-       ve.ui.Action.call( this, surface );
+       ve.ui.MWLinkAction.super.call( this, surface );
 };
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.MWLinkAction, ve.ui.Action );
+OO.inheritClass( ve.ui.MWLinkAction, ve.ui.LinkAction );
 
 /* Static Properties */
-
-ve.ui.MWLinkAction.static.name = 'mwlink';
 
 /**
  * List of allowed methods for the action.
@@ -33,11 +31,23 @@
  * @static
  * @property
  */
-ve.ui.MWLinkAction.static.methods = [ 'open' ];
+ve.ui.MWLinkAction.static.methods = 
ve.ui.MWLinkAction.super.static.methods.concat( [ 'open' ] );
 
 /* Methods */
 
 /**
+ * @method
+ * @inheritdoc
+ * @return {ve.dm.MWExternalLinkAnnotation} The annotation to use.
+ */
+ve.ui.MWLinkAction.prototype.getLinkAnnotation = function ( href ) {
+       return new ve.dm.MWExternalLinkAnnotation( {
+               type: 'link/mwExternal',
+               attributes: { href: href }
+       } );
+};
+
+/**
  * Open either the 'link' or 'linkNode' window, depending on what is selected.
  *
  * @method
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js
index 181605a..e41f1d3 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js
@@ -38,6 +38,6 @@
 
 ve.ui.commandRegistry.register(
        new ve.ui.Command(
-               'link', 'mwlink', 'open', { supportedSelections: [ 'linear' ] }
+               'link', 'link', 'open', { supportedSelections: [ 'linear' ] }
        )
 );

-- 
To view, visit https://gerrit.wikimedia.org/r/230973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to