Add decorator option for language links
Callback function to be called when a language link is prepared Can be used for custom decoration. Arguments: (a) the $language - the language link jQuery object (b) languageCode The function can do any styling, changing properites etc on the passed link. See examples/decorator.html for example usage. Change-Id: I5a67654440a07cf7dfac683e22dcb5000ded0bfe
This commit is contained in:
@@ -267,7 +267,8 @@
|
||||
quickList: this.options.quickList,
|
||||
clickhandler: $.proxy( this.select, this ),
|
||||
source: this.$languageFilter,
|
||||
showRegions: this.options.showRegions
|
||||
showRegions: this.options.showRegions,
|
||||
languageDecorator: this.options.languageDecorator
|
||||
} ).data( 'lcd' );
|
||||
|
||||
this.$languageFilter.languagefilter( {
|
||||
@@ -400,7 +401,8 @@
|
||||
languages: $.uls.data.getAutonyms(), // Languages to be used for ULS, default is all languages
|
||||
quickList: null, // Array of language codes or function that returns such
|
||||
compact: false, // Show ULS in compact mode
|
||||
showRegions: [ 'WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA' ]
|
||||
showRegions: [ 'WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA' ],
|
||||
languageDecorator: null // Callback function to be called when a language link is prepared - for custom decoration.
|
||||
};
|
||||
|
||||
// Define a dummy i18n function, if jquery.i18n not integrated.
|
||||
|
||||
Reference in New Issue
Block a user