Allow identifying the context of the different ULS panels within one app
Add the ulsPurpose option. Empty string by default. This is useful for web application that use ULS in several different context, and need to distinguish what was the purpose of the particular ULS panel. An example of usage can be found at https://phabricator.wikimedia.org/T179402
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
this.$element = $( element );
|
||||
this.options = $.extend( {}, $.fn.uls.defaults, options );
|
||||
this.$menu = $( template );
|
||||
this.$menu.data( 'uls-purpose', this.options.ulsPurpose );
|
||||
this.languages = this.options.languages;
|
||||
|
||||
for ( code in this.languages ) {
|
||||
@@ -393,6 +394,10 @@
|
||||
// The options are wide (4 columns), medium (2 columns), and narrow (1 column).
|
||||
// If not specified, it will be set automatically.
|
||||
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
|
||||
quickList: [],
|
||||
// Used by LCD
|
||||
|
||||
Reference in New Issue
Block a user