From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
co-authored by: Archana Singh <archus(a)linux.vnet.ibm.com>
This patch implements the new drop down
list for locale selection in wok.login.js
Signed-off-by: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
---
ui/js/src/wok.login.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ui/js/src/wok.login.js b/ui/js/src/wok.login.js
index f8eed3a..5231b7c 100644
--- a/ui/js/src/wok.login.js
+++ b/ui/js/src/wok.login.js
@@ -25,11 +25,20 @@ wok.login_main = function() {
$('.filter-option').parent().attr('title',$('#userLang
option[value="'+selectedLanguage+'"]').text());
$('.filter-option').text($('#userLang
option[value="'+selectedLanguage+'"]').text());
+ var selectedLocale = wok.lang.get_loc();
+ $('#userLocale').val(selectedLocale);
+ $('#userLocale
option[value="'+selectedLocale+'"]').attr("selected",
"selected");
+ $('.filter-option').attr('title',$('#userLocale
option[value="'+selectedLocale+'"]').text());
+
$('#userLang').on('change', function() {
wok.lang.set($(this).val());
location.reload();
});
+ $('#userLocale').on('change', function() {
+ wok.lang.set_loc($(this).val());
+ });
+
var query = window.location.search;
var error = /.*error=(.*?)(&|$)/g.exec(query);
if (error && error[1] === "sessionTimeout") {
--
2.1.0