Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/214015

Change subject: RTL fixes for the reference card
......................................................................

RTL fixes for the reference card

* Apply the source language's lang and dir attributes
  to the reference text.
* Fix the positioning of the + icon for the Add reference button.

Change-Id: I101af283891ea7a8cd4502ff6abc37614d1d7d28
---
M modules/tools/ext.cx.tools.reference.js
M modules/tools/styles/ext.cx.tools.reference.less
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/15/214015/1

diff --git a/modules/tools/ext.cx.tools.reference.js 
b/modules/tools/ext.cx.tools.reference.js
index 211cfc4..f31b21f 100644
--- a/modules/tools/ext.cx.tools.reference.js
+++ b/modules/tools/ext.cx.tools.reference.js
@@ -51,6 +51,11 @@
                $referenceInfo.append( $( '<div>' )
                        .addClass( 'card__reference-number' ) );
                $referenceInfo.append( $( '<div>' )
+                       // By default the reference is in the source language 
and direction
+                       .prop( {
+                               lang: mw.cx.sourceLanguage,
+                               dir: $.uls.data.getDir( mw.cx.sourceLanguage )
+                       } )
                        .addClass( 'card__reference-content' ) );
 
                $referenceInfo.append( this.$addReference, 
this.$removeReference );
diff --git a/modules/tools/styles/ext.cx.tools.reference.less 
b/modules/tools/styles/ext.cx.tools.reference.less
index 99cb761..dc56126 100644
--- a/modules/tools/styles/ext.cx.tools.reference.less
+++ b/modules/tools/styles/ext.cx.tools.reference.less
@@ -20,7 +20,7 @@
        color: #565656; // TODO Should come from library?
        .background-image-svg('../images/add.svg', '../images/add.png');
        background-color: #FFF;
-       background-position: 10px center;
+       background-position: left 10px center;
        background-repeat: no-repeat;
        background-size: 15px;
        padding: 5px 10px 5px 32px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I101af283891ea7a8cd4502ff6abc37614d1d7d28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>

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

Reply via email to