Close the language settings if clicked outside

Make the behavior consistant with ULS language selector

Change-Id: I9bfc29f908ebe48a1bb9cdcdede75a5d5aa3839d
This commit is contained in:
Santhosh Thottingal
2012-11-21 17:05:27 +05:30
parent 018b999328
commit 5e6d44e940

View File

@@ -63,11 +63,15 @@
},
listen: function () {
var that = this;
var langSettings = this;
// Register all event listeners to the ULS language settings here.
that.$element.on( 'click', $.proxy( that.show, that ) );
that.$window.find( '#languagesettings-close' )
.on( 'click', $.proxy( that.hide, that ) );
langSettings.$element.on( 'click', $.proxy( langSettings.show, langSettings ) );
langSettings.$window.find( '#languagesettings-close' )
.on( 'click', $.proxy( langSettings.hide, langSettings ) );
// hide this window if clicking elsewhere
$( document ).on( 'click', $.proxy( langSettings.hide, langSettings ) );
},
render: function () {