Log the context of the ULS in which no search results were found
Relies on updates to EventLogging schema. Diff: https://meta.wikimedia.org/w/index.php?title=Schema%3AUniversalLanguageSelector&type=revision&diff=17799034&oldid=7327441 Bug: T179402 Change-Id: I2ff9ce9b40df16ed3c5e6970fb3b691af08cedec
This commit is contained in:
@@ -190,6 +190,7 @@
|
||||
$trigger.removeClass( 'selector-open' );
|
||||
},
|
||||
languages: ulsLanguageList,
|
||||
ulsPurpose: 'compact-language-links',
|
||||
// Show common languages
|
||||
quickList: self.getCommonLanguages( languages ),
|
||||
noResultsTemplate: function () {
|
||||
|
||||
@@ -356,6 +356,7 @@
|
||||
// the apply button
|
||||
displaySettings.markDirty();
|
||||
},
|
||||
ulsPurpose: 'interface-language',
|
||||
quickList: function () {
|
||||
return mw.uls.getFrequentLanguageList();
|
||||
}
|
||||
|
||||
@@ -237,13 +237,16 @@
|
||||
/**
|
||||
* Log search strings which produce no search results.
|
||||
*
|
||||
* @param {jQuery.event} event The orignal event
|
||||
* @param {jQuery.event} event The original event
|
||||
* @param {string} context The query string
|
||||
* @param {string} ulsPurpose The ulsPurpose option of the ULS panel that triggered the event
|
||||
*/
|
||||
noSearchResults: function ( event, context ) {
|
||||
noSearchResults: function ( event, context, ulsPurpose ) {
|
||||
this.log( {
|
||||
action: 'no-search-results',
|
||||
context: context
|
||||
context: context,
|
||||
ulsPurpose: ulsPurpose,
|
||||
title: mw.config.get( 'wgPageName' )
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -293,6 +293,7 @@
|
||||
$input.focus();
|
||||
},
|
||||
languages: mw.ime.getLanguagesWithIME(),
|
||||
ulsPurpose: 'ime-selector',
|
||||
top: $input.offset().top
|
||||
} );
|
||||
|
||||
|
||||
@@ -390,7 +390,8 @@
|
||||
inputSettings.prepareLanguages();
|
||||
inputSettings.markDirty();
|
||||
},
|
||||
languages: mw.ime.getLanguagesWithIME()
|
||||
languages: mw.ime.getLanguagesWithIME(),
|
||||
ulsPurpose: 'input-settings'
|
||||
} );
|
||||
|
||||
$moreLanguagesButton.on( 'click', function () {
|
||||
|
||||
@@ -367,7 +367,15 @@
|
||||
},
|
||||
onSelect: function ( language ) {
|
||||
mw.uls.changeLanguage( language );
|
||||
}
|
||||
},
|
||||
// Not actually used on sites with the gear icon
|
||||
// in the interlanguage area, because this ULS
|
||||
// will be a container for other ULS panels.
|
||||
// However, this is used on sites with ULS
|
||||
// in the personal bar, and in that case it has the same
|
||||
// purpose as the selector in Display settings,
|
||||
// so it has the same identifier.
|
||||
ulsPurpose: 'interface-language'
|
||||
} );
|
||||
|
||||
// Allow styles to apply first and position to work by
|
||||
|
||||
Reference in New Issue
Block a user