Jsahleen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173806
Change subject: Source selector: Inject siteMapper as a dependency
......................................................................
Source selector: Inject siteMapper as a dependency
* Change constructor so it requires siteMapper object as dependency
* Adjust plugin function to automatically inject siteMapper
Change-Id: Ifcf9c730890c4c1b4b83489d0537e4dd2887b433
---
M modules/source/ext.cx.source.selector.js
1 file changed, 3 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/06/173806/1
diff --git a/modules/source/ext.cx.source.selector.js
b/modules/source/ext.cx.source.selector.js
index 7038e80..cc1dfb1 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -15,11 +15,11 @@
* CXSourceSelector
* @class
*/
- function CXSourceSelector( $trigger, options ) {
+ function CXSourceSelector( $trigger, siteMapper, options ) {
this.$trigger = $( $trigger );
this.options = $.extend( {}, options );
// @todo Refactor
- this.siteMapper = mw.cx.siteMapper;
+ this.siteMapper = siteMapper;
this.languagePairs = null;
this.sourceLanguages = [];
@@ -651,7 +651,7 @@
data = $this.data( 'cxsourceselector' );
if ( !data ) {
- $this.data( 'cxsourceselector', ( data = new
CXSourceSelector( this, options ) ) );
+ $this.data( 'cxsourceselector', ( data = new
CXSourceSelector( this, mw.cx.siteMapper, options ) ) );
}
} );
};
--
To view, visit https://gerrit.wikimedia.org/r/173806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcf9c730890c4c1b4b83489d0537e4dd2887b433
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits