aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-06-19 19:08:53 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-06-19 19:08:53 +0200
commitdcd7d962960ade175400cbb9b8e00575e8735a22 (patch)
tree482366a98847fe4f65f698ac8215260c18c23355 /phpBB/adm
parent7b4f9765f8ab515c19d360818d7e57e5d6e47bd3 (diff)
downloadforums-dcd7d962960ade175400cbb9b8e00575e8735a22.tar
forums-dcd7d962960ade175400cbb9b8e00575e8735a22.tar.gz
forums-dcd7d962960ade175400cbb9b8e00575e8735a22.tar.bz2
forums-dcd7d962960ade175400cbb9b8e00575e8735a22.tar.xz
forums-dcd7d962960ade175400cbb9b8e00575e8735a22.zip
[feature/new-tz-handling] Use asset in acp and subsilver2 and remove duplicates
PHPBB3-9558
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/style/timezone.js40
-rw-r--r--phpBB/adm/style/timezone_option.html2
2 files changed, 9 insertions, 33 deletions
diff --git a/phpBB/adm/style/timezone.js b/phpBB/adm/style/timezone.js
index d1667699da..4556ea5f94 100644
--- a/phpBB/adm/style/timezone.js
+++ b/phpBB/adm/style/timezone.js
@@ -1,35 +1,11 @@
-/**
-* 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");
- $("#timezone > optgroup[label='" + $('#tz_date').val() + "']").css("display", "block");
+(function($) { // Avoid conflicts with other libraries
- if ($("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option").size() == 1)
- {
- // If there is only one timezone for the selected date, we just select that automatically.
- $("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").attr("selected", true);
- keep_selection = true;
- }
+$('#tz_date').change(function() {
+ phpbb.timezone_switch_date(false);
+});
- if (typeof keep_selection !== 'undefined')
- {
- if (!keep_selection)
- {
- $('#timezone > option:first').attr("selected", true);
- }
- }
-}
+$(document).ready(
+ phpbb.timezone_enable_date_selection
+);
-/**
-* Display the date/time select
-*/
-function phpbb_enable_tz_dates()
-{
- $('#tz_select_date').css("display", "block");
-}
-
-phpbb_enable_tz_dates();
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/adm/style/timezone_option.html b/phpBB/adm/style/timezone_option.html
index e12219b1c0..23c0ee19e9 100644
--- a/phpBB/adm/style/timezone_option.html
+++ b/phpBB/adm/style/timezone_option.html
@@ -2,7 +2,7 @@
<dt><label for="timezone">{L_BOARD_TIMEZONE}:</label></dt>
<!-- IF S_TZ_DATE_OPTIONS -->
<dd id="tz_select_date" style="display: none;">
- <select name="tz_date" id="tz_date" class="autowidth tz_select" onchange="phpbb_switch_tz_date(false);">
+ <select name="tz_date" id="tz_date" class="autowidth tz_select">
<option value="">{L_SELECT_CURRENT_TIME}</option>
{S_TZ_DATE_OPTIONS}
</select>