wrapper function for localization pulldown menu to work as trigger
function for notifications
This commit is contained in:
parent
770f3b5979
commit
22783a53cd
@ -42,12 +42,15 @@ init: function() {
|
||||
}
|
||||
|
||||
// generate selectors
|
||||
OSRM.GUI.selectorInit("gui-language-toggle", options, selected, OSRM.Localization.setLanguage);
|
||||
OSRM.GUI.selectorInit("gui-language-2-toggle", options_2, selected, OSRM.Localization.setLanguage);
|
||||
OSRM.GUI.selectorInit("gui-language-toggle", options, selected, OSRM.Localization.setLanguageWrapper);
|
||||
OSRM.GUI.selectorInit("gui-language-2-toggle", options_2, selected, OSRM.Localization.setLanguageWrapper);
|
||||
|
||||
// set default language
|
||||
OSRM.Localization.setLanguage( OSRM.DEFAULTS.LANGUAGE );
|
||||
},
|
||||
setLanguageWrapper: function(language) {
|
||||
OSRM.Localization.setLanguage(language);
|
||||
},
|
||||
setLanguage: function(language) {
|
||||
// change value of both language selectors
|
||||
OSRM.GUI.selectorChange( document.getElementById('gui-language-toggle'), language );
|
||||
|
Loading…
Reference in New Issue
Block a user