Log ui-lang-revert

Change-Id: Ic48dbd7a9d4d43812f437e3c9f17d1ee208166e8
This commit is contained in:
Niklas Laxström
2013-08-01 15:33:12 +00:00
committed by Amire80
parent 8e1726e745
commit e8479a070d

View File

@@ -239,9 +239,16 @@
hideTipsy(); hideTipsy();
}, timeout ); }, timeout );
} ); } );
// Event handler for links in the tooltip
$( 'a.uls-prevlang-link' ).on( 'click', function () { // Event handler for links in the tooltip.
mw.uls.changeLanguage( $( this ).attr( 'lang' ) ); // It looks like the tipsy is always created from scratch so that
// there wont be multiple event handlers bound to same click.
$( 'a.uls-prevlang-link' ).on( 'click.ulstipsy', function ( event ) {
event.preventDefault();
mw.uls.logEvent( { action: 'ui-lang-revert' }, 500 )
.always( function () {
mw.uls.changeLanguage( event.target.lang );
} );
} ); } );
tipsyTimer = window.setTimeout( function () { tipsyTimer = window.setTimeout( function () {
hideTipsy(); hideTipsy();