Unhide a language instead of adding it

Solves a few bugs. Displays language titles and quality indicators
are not lost.

Bug: 62376

Change-Id: I0d597eec3b70bb33c96086eefe14edcd92029aaa
This commit is contained in:
Niharika Kohli
2014-03-27 03:20:53 +00:00
committed by Santhosh
parent 430544be2d
commit 28d5d8da03

View File

@@ -78,7 +78,7 @@
var language;
for ( language in this.compactList ) {
this.addLanguage( language );
this.showLanguage( language );
}
this.addTrigger();
},
@@ -250,21 +250,11 @@
},
/**
* Add a language to the interlanguage list
* Show a language from the interlanguage list
* @param {string} language
*/
addLanguage: function ( language ) {
var $link, $listItem, languageLink;
languageLink = this.interlanguageList[ language ];
$link = $( '<a>' )
.addClass( 'active' )
.attr( 'href', languageLink.href )
.text( languageLink.autonym );
$listItem = $( '<li>' )
.addClass( 'interlanguage-link interwiki-' + language )
.append( $link );
this.$interlanguageList.append( $listItem );
showLanguage: function ( language ) {
this.$interlanguageList.find( '.interwiki-' + language ).show();
}
};