eventlogger module for ULS
Separating event logging out of ULS functionality. Event logging is now loosely coupled with ULS. ULS core modules can emit an event whenever EventLogging is required. The eventlogger module will act on the event if configured. Change-Id: I59dfcfb25c1acb85376b56239f2355ee7c4aff1e
This commit is contained in:
committed by
Amir E. Aharoni
parent
8defd1f4a8
commit
117cc5bf46
@@ -91,7 +91,7 @@
|
||||
.click();
|
||||
} );
|
||||
}
|
||||
|
||||
mw.hook( 'mw.uls.settings.open' ).fire( 'uls' );
|
||||
uls.hide();
|
||||
} );
|
||||
}
|
||||
@@ -121,11 +121,7 @@
|
||||
} );
|
||||
}
|
||||
|
||||
mw.uls.logEvent( {
|
||||
action: 'settings-open',
|
||||
context: 'uls'
|
||||
} );
|
||||
|
||||
mw.hook( 'mw.uls.settings.open' ).fire( 'uls' );
|
||||
uls.hide();
|
||||
} );
|
||||
}
|
||||
@@ -252,10 +248,9 @@
|
||||
// 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 );
|
||||
} );
|
||||
mw.hook( 'mw.uls.language.revert' ).fire( function () {
|
||||
mw.uls.changeLanguage( event.target.lang );
|
||||
} );
|
||||
} );
|
||||
tipsyTimer = window.setTimeout( function () {
|
||||
hideTipsy();
|
||||
@@ -333,10 +328,7 @@
|
||||
|
||||
if ( languagesettings ) {
|
||||
if ( !languagesettings.shown ) {
|
||||
mw.uls.logEvent( {
|
||||
action: 'settings-open',
|
||||
context: eventParams && eventParams.source || 'interlanguage'
|
||||
} );
|
||||
mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'interlanguage' );
|
||||
}
|
||||
} else {
|
||||
// Initialize the Language settings window
|
||||
@@ -385,10 +377,7 @@
|
||||
|
||||
if ( languagesettings ) {
|
||||
if ( !languagesettings.shown ) {
|
||||
mw.uls.logEvent( {
|
||||
action: 'settings-open',
|
||||
context: eventParams && eventParams.source || 'personal'
|
||||
} );
|
||||
mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'personal' );
|
||||
}
|
||||
} else {
|
||||
mw.loader.using( mw.uls.languageSettingsModules, function () {
|
||||
@@ -407,10 +396,7 @@
|
||||
|
||||
if ( uls ) {
|
||||
if ( !uls.shown ) {
|
||||
mw.uls.logEvent( {
|
||||
action: 'settings-open',
|
||||
context: eventParams && eventParams.source || 'personal'
|
||||
} );
|
||||
mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'personal' );
|
||||
}
|
||||
} else {
|
||||
// ULS options that are common to all modes of showing
|
||||
|
||||
Reference in New Issue
Block a user