Show badges in ULS language list

Update jquery.uls to ae9dda23b71aa76fbbc13f5650

Bug: T131233
Change-Id: I7c7bafccc7d63c0a97c98b81a5b53b48c9afa527
This commit is contained in:
Niklas Laxström
2016-06-01 19:17:50 +02:00
committed by Santhosh Thottingal
parent 83f9596035
commit 2a6b4d0fc2
4 changed files with 37 additions and 23 deletions

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' );