Update jquery.uls from upstream

* Compact mode
* Close ULS when clicked outside

Change-Id: I9cece8cde025ff2816ac8f908c425347c15f7490
This commit is contained in:
Santhosh Thottingal
2013-03-15 14:58:10 +05:30
parent 4a95dc7832
commit fc7578abb1
2 changed files with 81 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
/*! jquery.uls - v0.1.0 - 2013-03-06
/*! jquery.uls - v0.1.0 - 2013-03-15
* https://github.com/wikimedia/jquery.uls
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
@@ -1500,6 +1500,10 @@
left: '25%'
} );
if ( this.options.compact ) {
this.$menu.addClass( 'uls-compact' );
}
if ( !this.initialized ) {
$( 'body' ).prepend( this.$menu );
this.i18n();
@@ -1638,6 +1642,8 @@
uls.$languageFilter.languagefilter( 'clear' );
}
} );
$( 'html' ).click( $.proxy( this.hide, this ) );
},
/**
@@ -1740,6 +1746,7 @@
languages: $.uls.data.getAutonyms(), // Languages to be used for ULS, default is all languages
quickList: null, // Array of language codes or function that returns such
lazyload: true, // Lazy load the language list when scrolled.
compact: false, // Show ULS in compact mode
showRegions: ['WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA']
};