JGonera has uploaded a new change for review.
https://gerrit.wikimedia.org/r/150743
Change subject: Disable tools other than links and references on mobile
......................................................................
Disable tools other than links and references on mobile
Temporary measure so that we don't show mobile context when we
shouldn't.
Change-Id: I19c4ed2aa361bec385ae7888ee62fc2cc916b9b8
---
M modules/ve/ui/ve.ui.MobileContext.js
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/43/150743/1
diff --git a/modules/ve/ui/ve.ui.MobileContext.js
b/modules/ve/ui/ve.ui.MobileContext.js
index 42c7160..6feb81c 100644
--- a/modules/ve/ui/ve.ui.MobileContext.js
+++ b/modules/ve/ui/ve.ui.MobileContext.js
@@ -72,3 +72,22 @@
return deferred.promise();
};
+
+/**
+ * @inheritdoc
+ */
+ve.ui.MobileContext.prototype.getAvailableTools = function () {
+ var tools = ve.ui.MobileContext.super.prototype.getAvailableTools.call(
this );
+
+ // Filter out tools not supported in mobile mode
+ // FIXME: This is a temporary hack. Ideally, we don't want to load any
code
+ // that is not supported on a given platform. However, present
implementation
+ // of citation dialog forces us to load tools that we don't want on
mobile.
+ return this.availableTools = tools.filter( function( tool ) {
+ return (
+ tool.model instanceof ve.dm.MWInternalLinkAnnotation ||
+ tool.model instanceof ve.dm.MWExternalLinkAnnotation ||
+ tool.model instanceof ve.dm.MWReferenceNode
+ );
+ } );
+};
--
To view, visit https://gerrit.wikimedia.org/r/150743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19c4ed2aa361bec385ae7888ee62fc2cc916b9b8
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits