Merge pull request #299 from amire80/ulsPurpose
Allow identifying the context of the different ULS panels within one app
This commit is contained in:
@@ -230,6 +230,7 @@
|
|||||||
this.$languageFilter.languagefilter( {
|
this.$languageFilter.languagefilter( {
|
||||||
lcd: lcd,
|
lcd: lcd,
|
||||||
languages: this.languages,
|
languages: this.languages,
|
||||||
|
ulsPurpose: this.options.ulsPurpose,
|
||||||
searchAPI: this.options.searchAPI,
|
searchAPI: this.options.searchAPI,
|
||||||
onSelect: $.proxy( this.select, this )
|
onSelect: $.proxy( this.select, this )
|
||||||
} );
|
} );
|
||||||
@@ -393,6 +394,10 @@
|
|||||||
// The options are wide (4 columns), medium (2 columns), and narrow (1 column).
|
// The options are wide (4 columns), medium (2 columns), and narrow (1 column).
|
||||||
// If not specified, it will be set automatically.
|
// If not specified, it will be set automatically.
|
||||||
menuWidth: undefined,
|
menuWidth: undefined,
|
||||||
|
// What is this ULS used for.
|
||||||
|
// Should be set for distinguishing between different instances of ULS
|
||||||
|
// in the same application.
|
||||||
|
ulsPurpose: '',
|
||||||
// Used by LCD
|
// Used by LCD
|
||||||
quickList: [],
|
quickList: [],
|
||||||
// Used by LCD
|
// Used by LCD
|
||||||
|
|||||||
@@ -233,7 +233,11 @@
|
|||||||
resultHandler: function ( query, results, autofillLabel ) {
|
resultHandler: function ( query, results, autofillLabel ) {
|
||||||
if ( results.length === 0 ) {
|
if ( results.length === 0 ) {
|
||||||
this.$suggestion.val( '' );
|
this.$suggestion.val( '' );
|
||||||
this.$element.trigger( 'noresults.uls', query );
|
this.$element.trigger(
|
||||||
|
'noresults.uls',
|
||||||
|
query,
|
||||||
|
this.options.ulsPurpose
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,6 +342,10 @@
|
|||||||
lcd: undefined,
|
lcd: undefined,
|
||||||
// URL to which we append query parameter with the query value
|
// URL to which we append query parameter with the query value
|
||||||
searchAPI: undefined,
|
searchAPI: undefined,
|
||||||
|
// What is this ULS used for.
|
||||||
|
// Should be set for distinguishing between different instances of ULS
|
||||||
|
// in the same application.
|
||||||
|
ulsPurpose: '',
|
||||||
// Object of language tags to language names
|
// Object of language tags to language names
|
||||||
languages: [],
|
languages: [],
|
||||||
// Callback function when language is selected
|
// Callback function when language is selected
|
||||||
|
|||||||
Reference in New Issue
Block a user