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:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user