Lazy loading of regions
Also adds landing page feature. But candidate list is hardcoded for now. Example html file updated. show method of lcd renamed to render. Introduced a trigger searchclear Introduced mw.uls.changeLanguage, setPreviousLanguages getPreviousLanguages and getBrowserLanguage methods Region groups re-numbered - from [4, 1, 2, 3] to [1, 2, 3, 4]. Change-Id: Iac1edf628708e6f40e41578df70d40c42f15289a
This commit is contained in:
committed by
Amir E. Aharoni
parent
b845045070
commit
fde6b18e40
@@ -323,19 +323,6 @@
|
||||
this.$parent.hide();
|
||||
},
|
||||
|
||||
/**
|
||||
* Change the language of wiki using setlang URL parameter
|
||||
* @param {String} language
|
||||
*/
|
||||
changeLanguage: function ( language ) {
|
||||
$.cookie( 'uls-previous-language', this.getUILanguage() );
|
||||
var uri = new mw.Uri( window.location.href );
|
||||
uri.extend( {
|
||||
setlang: language
|
||||
} );
|
||||
window.location.href = uri.toString();
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback for save preferences
|
||||
*/
|
||||
@@ -346,7 +333,7 @@
|
||||
this.$parent.hide();
|
||||
// we delay change UI language to here, because it causes a page refresh
|
||||
if ( this.uiLanguage !== this.getUILanguage() ) {
|
||||
this.changeLanguage( this.uiLanguage );
|
||||
mw.uls.changeLanguage( this.uiLanguage );
|
||||
}
|
||||
} else {
|
||||
// FIXME failure. what to do?!
|
||||
|
||||
Reference in New Issue
Block a user