Expose compact mode as an option

* some minor space cleanup
* Also close the ULS window when clicked outside

Change-Id: I06b465926196f79e47990e80e3b23f5a16474ba3
This commit is contained in:
Santhosh Thottingal
2013-03-15 14:57:19 +05:30
parent 44ff5e0120
commit 0340e609a0
4 changed files with 11 additions and 14 deletions

View File

@@ -26,20 +26,10 @@
var languageName = $.uls.data.getAutonym( language );
$( '.uls-trigger' ).text( languageName );
},
compact: true,
quickList: [ 'en', 'hi', 'he', 'ml', 'ta', 'fr' ]
} );
$( '.uls-trigger' ).click( function () {
//Hacks to include optional classes and make the dialog close when clicking outside:
$( '.uls-menu' ).addClass( 'uls-compact' );
$( 'html' ).click( function () {
$( '.uls-menu' ).hide();
} );
$( '.uls-menu' ).click( function ( event ) {
event.stopPropagation();
} );
} );
} );
} );
</script>
</head>