Delay loading of language settings javascript

Load them when language settings is opened using cog or ULS icon click

Change-Id: I472497c549bff0fd578156fa0113dae2d6a7a7fb
This commit is contained in:
Santhosh Thottingal
2013-07-25 13:28:37 +05:30
committed by Amir E. Aharoni
parent b96e6ed20a
commit d92c75518b
4 changed files with 45 additions and 20 deletions

View File

@@ -121,6 +121,17 @@
$moreSettingsLink = $( '<span>' )
.addClass( 'uls-ime-more-settings-link' );
mw.loader.using( mw.uls.languageSettingsModules, function () {
$moreSettingsLink.languagesettings( {
defaultModule: 'input',
onClose: function () {
// on close of input settings, keep focus in input area.
imeselector.$element.focus();
},
top: imeselector.$element.offset().top
} );
} );
// Hide the menu.
$moreSettingsLink.on( 'click', function ( e ) {
var languageSettings = $( this ).data( 'languagesettings' );