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

Change subject: Extension inspector directionality
......................................................................


Extension inspector directionality

Use a dir string instead of isLtr boolean like we do everywhere
else. Also use this.constructor.static, not this.static inside
methods.

Fixes Ie0525628.

Bug: 64072
Change-Id: I5321b71a446802d89ca86d55a0bff855b69825eb
---
M modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
index b91373f..dc0a5e2 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
@@ -42,13 +42,15 @@
 ve.ui.MWExtensionInspector.static.allowedEmpty = false;
 
 /**
- * Extension is forced to always be LTR; defaults to false
+ * Inspector's directionality, 'ltr' or 'rtl'
+ *
+ * Leave as null to use the directionality of the current fragment.
  *
  * @static
- * @property {boolean}
+ * @property {string|null}
  * @inheritable
  */
-ve.ui.MWExtensionInspector.static.forcedLtr = false;
+ve.ui.MWExtensionInspector.static.dir = null;
 
 /* Methods */
 
@@ -97,7 +99,8 @@
 
        this.input.$input.attr( 'placeholder', this.getInputPlaceholder() );
 
-       this.input.setRTL( !this.static.forcedLtr && ( data.dir === 'rtl' ) );
+       var dir = this.constructor.static.dir || data.dir;
+       this.input.setRTL( dir === 'rtl' );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5321b71a446802d89ca86d55a0bff855b69825eb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[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