aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/timezone.js8
-rw-r--r--phpBB/styles/prosilver/template/timezone.js19
-rw-r--r--phpBB/styles/subsilver2/template/timezone.js19
3 files changed, 36 insertions, 10 deletions
diff --git a/phpBB/adm/style/timezone.js b/phpBB/adm/style/timezone.js
index a1ffeb17c5..d1667699da 100644
--- a/phpBB/adm/style/timezone.js
+++ b/phpBB/adm/style/timezone.js
@@ -1,3 +1,8 @@
+/**
+* Hide the optgroups that are not the selected timezone
+*
+* @param bool keep_selection Shall we keep the value selected, or shall the user be forced to repick one.
+*/
function phpbb_switch_tz_date(keep_selection)
{
$('#timezone > optgroup').css("display", "none");
@@ -19,6 +24,9 @@ function phpbb_switch_tz_date(keep_selection)
}
}
+/**
+* Display the date/time select
+*/
function phpbb_enable_tz_dates()
{
$('#tz_select_date').css("display", "block");
diff --git a/phpBB/styles/prosilver/template/timezone.js b/phpBB/styles/prosilver/template/timezone.js
index f73a82a063..b91aae6244 100644
--- a/phpBB/styles/prosilver/template/timezone.js
+++ b/phpBB/styles/prosilver/template/timezone.js
@@ -1,3 +1,8 @@
+/**
+* Hide the optgroups that are not the selected timezone
+*
+* @param bool keep_selection Shall we keep the value selected, or shall the user be forced to repick one.
+*/
function phpbb_switch_tz_date(keep_selection)
{
$('#timezone > optgroup').css("display", "none");
@@ -19,11 +24,20 @@ function phpbb_switch_tz_date(keep_selection)
}
}
+/**
+* Display the date/time select
+*/
function phpbb_enable_tz_dates()
{
$('#tz_select_date').css("display", "block");
}
+/**
+* Preselect a date/time or suggest one, if it is not picked.
+*
+* @param bool force_selector Shall we select the suggestion?
+* @param string l_suggestion The language string which we use, to display the selection
+*/
function phpbb_preselect_tz_select(force_selector, l_suggestion)
{
@@ -78,11 +92,6 @@ function phpbb_preselect_tz_select(force_selector, l_suggestion)
}
else
{
- // Firefox scrolls the selector only to put the option into view;
- // for negative-offset timezones, this means the first timezone
- // of a particular offset will be the bottom one, and selected,
- // with all other timezones not visible. Not much can be done
- // about that here unfortunately.
option.selected = true;
phpbb_switch_tz_date(!force_selector);
$('#tz_select_date_suggest').css("display", "none");
diff --git a/phpBB/styles/subsilver2/template/timezone.js b/phpBB/styles/subsilver2/template/timezone.js
index f73a82a063..b91aae6244 100644
--- a/phpBB/styles/subsilver2/template/timezone.js
+++ b/phpBB/styles/subsilver2/template/timezone.js
@@ -1,3 +1,8 @@
+/**
+* Hide the optgroups that are not the selected timezone
+*
+* @param bool keep_selection Shall we keep the value selected, or shall the user be forced to repick one.
+*/
function phpbb_switch_tz_date(keep_selection)
{
$('#timezone > optgroup').css("display", "none");
@@ -19,11 +24,20 @@ function phpbb_switch_tz_date(keep_selection)
}
}
+/**
+* Display the date/time select
+*/
function phpbb_enable_tz_dates()
{
$('#tz_select_date').css("display", "block");
}
+/**
+* Preselect a date/time or suggest one, if it is not picked.
+*
+* @param bool force_selector Shall we select the suggestion?
+* @param string l_suggestion The language string which we use, to display the selection
+*/
function phpbb_preselect_tz_select(force_selector, l_suggestion)
{
@@ -78,11 +92,6 @@ function phpbb_preselect_tz_select(force_selector, l_suggestion)
}
else
{
- // Firefox scrolls the selector only to put the option into view;
- // for negative-offset timezones, this means the first timezone
- // of a particular offset will be the bottom one, and selected,
- // with all other timezones not visible. Not much can be done
- // about that here unfortunately.
option.selected = true;
phpbb_switch_tz_date(!force_selector);
$('#tz_select_date_suggest').css("display", "none");