Log ui-lang-revert
Change-Id: Ic48dbd7a9d4d43812f437e3c9f17d1ee208166e8
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user