Merge "Show badges in ULS language list"

This commit is contained in:
Santhosh authored and Gerrit Code Review committed 2016-06-09 12:01:04 +00:00
commit 09d4c149ca
3 files changed
+36 -22

No files matched your search

+6 -2
View File
@@ -156,13 +156,17 @@
$trigger.addClass( 'selector-open' );
},
languageDecorator: function ( $languageLink, language ) {
var data = self.interlanguageList[ language ];
// set href and text exactly same as what was in
// interlanguage link. The ULS autonym might be different in some
// cases like sr. In ULS it is "српски", while in interlanguage links
// it is "српски / srpski"
$languageLink
.prop( 'href', self.interlanguageList[ language ].href )
.text( self.interlanguageList[ language ].autonym );
.prop( 'href', data.href )
.text( data.autonym );
// This code is to support badges used in Wikimedia
$languageLink.parent().addClass( data.element.parentNode.className );
},
onCancel: function () {
$trigger.removeClass( 'selector-open' );