aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/assets/javascript/core.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 669f662b16..17e859eedc 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -499,18 +499,20 @@ phpbb.timezone_preselect_select = function(force_selector) {
if ($('#tz_date').val() != option.value && !force_selector) {
// We do not select the option for the user, but notify him,
// 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);
+ $('#tz_select_date_suggest').css('display', 'inline');
} else {
option.selected = true;
phpbb.timezone_switch_date(!force_selector);
- $('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);
$('#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;
}
}
}