mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 16:15:22 +02:00
[ticket/11004] Always update suggestion button in timezone_preselect_select
Suggestion must also be updated when the suggestion is selected at first, so we can display a correct button, when the suggestion is not selected anymore. PHPBB3-11004
This commit is contained in:
parent
5bdec7669b
commit
fd40e841cb
@ -499,18 +499,20 @@ phpbb.timezone_preselect_select = function(force_selector) {
|
|||||||
if ($('#tz_date').val() != option.value && !force_selector) {
|
if ($('#tz_date').val() != option.value && !force_selector) {
|
||||||
// We do not select the option for the user, but notify him,
|
// We do not select the option for the user, but notify him,
|
||||||
// that we would suggest a different setting.
|
// that we would suggest a different setting.
|
||||||
$('#tz_select_date_suggest').css('display', 'inline');
|
|
||||||
$('#tz_select_date_suggest').attr('title', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML));
|
|
||||||
$('#tz_select_date_suggest').attr('value', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML.substring(0, 9)));
|
|
||||||
$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);
|
|
||||||
phpbb.timezone_switch_date(true);
|
phpbb.timezone_switch_date(true);
|
||||||
|
$('#tz_select_date_suggest').css('display', 'inline');
|
||||||
} else {
|
} else {
|
||||||
option.selected = true;
|
option.selected = true;
|
||||||
phpbb.timezone_switch_date(!force_selector);
|
phpbb.timezone_switch_date(!force_selector);
|
||||||
$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);
|
|
||||||
$('#tz_select_date_suggest').css('display', 'none');
|
$('#tz_select_date_suggest').css('display', 'none');
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
$('#tz_select_date_suggest').attr('title', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML));
|
||||||
|
$('#tz_select_date_suggest').attr('value', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML.substring(0, 9)));
|
||||||
|
$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);
|
||||||
|
|
||||||
|
// Found the suggestion, there cannot be more, so return from here.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user