Update jquery.uls from upstream

* UX fixes
* More localization

Change-Id: I9f0345cbd4b785f4293ab02fe0006df5c7377cd1
This commit is contained in:
Santhosh Thottingal
2012-11-21 17:34:51 +05:30
parent 36a8382763
commit 9a6f1cfd93
22 changed files with 182 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
/*! jquery.uls - v0.1.0 - 2012-11-20
/*! jquery.uls - v0.1.0 - 2012-11-21
* https://github.com/wikimedia/jquery.uls
* Copyright (c) 2012 Santhosh Thottingal; Licensed GPL, MIT */
@@ -1469,6 +1469,10 @@
this.defaultSearch();
this.initialized = true;
}
// hide any other ULS visible
$( '.uls-menu' ).hide();
this.$menu.show();
this.shown = true;
@@ -1530,8 +1534,7 @@
*/
listen: function() {
var lcd,
uls = this,
cancelProxy = $.proxy( uls.cancel, uls );
uls = this;
// Register all event listeners to the ULS here.
uls.$element.on( 'click', $.proxy( uls.click, uls ) );
@@ -1539,13 +1542,11 @@
uls.$languageFilter.on( 'searchclear', $.proxy( uls.defaultSearch, uls ) );
// Close when clicking on the close button
uls.$menu.find( '#uls-close' ).on( 'click', cancelProxy );
uls.$menu.find( '#uls-close' ).on( 'click', $.proxy( uls.cancel, uls ) );
// Don't do anything if pressing on empty space in the ULS
uls.$menu.on( 'click', function ( e ) {
e.stopPropagation();
} );
// Close ULS if clicking elsewhere
$( document ).on( 'click', cancelProxy );
// Handle key press events on the menu
uls.$menu.on( 'keypress', $.proxy( this.keypress, this ) )