mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-16 13:44:12 +02:00
Merge pull request #843 from nickvergessen/feature/new-tz-handling
Feature/new tz handling
This commit is contained in:
19
phpBB/styles/prosilver/template/timezone.js
Normal file
19
phpBB/styles/prosilver/template/timezone.js
Normal file
@@ -0,0 +1,19 @@
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
$('#tz_date').change(function() {
|
||||
phpbb.timezone_switch_date(false);
|
||||
});
|
||||
|
||||
$('#tz_select_date_suggest').click(function(){
|
||||
phpbb.timezone_preselect_select(true);
|
||||
});
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_enable_date_selection
|
||||
);
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == 'true')
|
||||
);
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
20
phpBB/styles/prosilver/template/timezone_option.html
Normal file
20
phpBB/styles/prosilver/template/timezone_option.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<dl>
|
||||
<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">
|
||||
<option value="">{L_SELECT_CURRENT_TIME}</option>
|
||||
{S_TZ_DATE_OPTIONS}
|
||||
</select>
|
||||
<input id="tz_select_date_suggest" class="inputbox button2" style="display: none; width: 150px !important;" data-is-registration="<!-- IF S_REGISTRATION -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="fuu" />
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
<dd>
|
||||
<select name="tz" id="timezone" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_TIMEZONE}</option>
|
||||
{S_TZ_OPTIONS}
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS template/timezone.js -->
|
||||
</dd>
|
||||
</dl>
|
@@ -73,17 +73,7 @@
|
||||
<dd><select name="style" id="style">{S_STYLE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="timezone">{L_BOARD_TIMEZONE}:</label></dt>
|
||||
<dd><select name="tz" id="timezone" class="autowidth">{S_TZ_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="dst1">{L_BOARD_DST}:</label></dt>
|
||||
<dd>
|
||||
<label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- INCLUDE timezone_option.html -->
|
||||
<dl>
|
||||
<dt><label for="dateformat">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
|
@@ -53,10 +53,8 @@
|
||||
<dt><label for="lang">{L_LANGUAGE}:</label></dt>
|
||||
<dd><select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="tz">{L_TIMEZONE}:</label></dt>
|
||||
<dd><select name="tz" id="tz" tabindex="7" class="autowidth">{S_TZ_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
<!-- INCLUDE timezone_option.html -->
|
||||
|
||||
<!-- IF .profile_fields -->
|
||||
<dl><dd><strong>{L_ITEMS_REQUIRED}</strong></dd></dl>
|
||||
@@ -106,4 +104,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/timezone.js"></script>
|
||||
<script type="text/javascript">phpbb_preselect_tz_select();</script>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
|
@@ -32,6 +32,11 @@ option {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
select optgroup option {
|
||||
padding-right: 1em;
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
textarea {
|
||||
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
|
||||
width: 60%;
|
||||
|
19
phpBB/styles/subsilver2/template/timezone.js
Normal file
19
phpBB/styles/subsilver2/template/timezone.js
Normal file
@@ -0,0 +1,19 @@
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
$('#tz_date').change(function() {
|
||||
phpbb.timezone_switch_date(false);
|
||||
});
|
||||
|
||||
$('#tz_select_date_suggest').click(function(){
|
||||
phpbb.timezone_preselect_select(true);
|
||||
});
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_enable_date_selection
|
||||
);
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == 'true')
|
||||
);
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
20
phpBB/styles/subsilver2/template/timezone_option.html
Normal file
20
phpBB/styles/subsilver2/template/timezone_option.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<tr>
|
||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
|
||||
<td class="row2">
|
||||
<!-- IF S_TZ_DATE_OPTIONS -->
|
||||
<div id="tz_select_date" style="display: none;">
|
||||
<select name="tz_date" id="tz_date" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_CURRENT_TIME}</option>
|
||||
{S_TZ_DATE_OPTIONS}
|
||||
</select><br />
|
||||
<input id="tz_select_date_suggest" class="btnlite" style="display: none;" data-is-registration="<!-- IF S_REGISTRATION -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<select name="tz" id="timezone" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_TIMEZONE}</option>
|
||||
{S_TZ_OPTIONS}
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS template/timezone.js -->
|
||||
</td>
|
||||
</tr>
|
@@ -71,16 +71,7 @@
|
||||
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
|
||||
<td class="row2">
|
||||
<select id="tz" name="tz">{S_TZ_OPTIONS}</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
|
||||
<td class="row2"><input type="radio" class="radio" name="dst" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_YES}</span> <input type="radio" class="radio" name="dst" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_NO}</span></td>
|
||||
</tr>
|
||||
<!-- INCLUDE timezone_option.html -->
|
||||
<tr>
|
||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
|
||||
<td class="row2">
|
||||
|
@@ -53,10 +53,9 @@
|
||||
<td class="row1"><b class="genmed">{L_LANGUAGE}: </b></td>
|
||||
<td class="row2"><select name="lang" onchange="change_language(this.value); return false;">{S_LANG_OPTIONS}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td>
|
||||
<td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
|
||||
</tr>
|
||||
|
||||
<!-- INCLUDE timezone_option.html -->
|
||||
|
||||
<!-- IF .profile_fields -->
|
||||
<tr>
|
||||
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
|
||||
|
Reference in New Issue
Block a user