Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
7298d324
Commit
7298d324
authored
May 18, 2012
by
Marc Schumann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The calendar widget is not localizable.
r/a=LpSolit
https://bugzilla.mozilla.org/show_bug.cgi?id=581365
parent
d3a92bd6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
15 deletions
+59
-15
field.js
js/field.js
+10
-2
field.html.tmpl
template/en/default/bug/field.html.tmpl
+3
-2
summarize-time.html.tmpl
template/en/default/bug/summarize-time.html.tmpl
+5
-5
calendar.js.tmpl
template/en/default/global/calendar.js.tmpl
+33
-0
field.html.tmpl
template/en/default/search/field.html.tmpl
+4
-3
form.html.tmpl
template/en/default/search/form.html.tmpl
+4
-3
No files found.
js/field.js
View file @
7298d324
...
...
@@ -83,9 +83,17 @@ function _errorFor(field, name) {
YAHOO
.
util
.
Dom
.
addClass
(
field
,
'validation_error_field'
);
}
function
createCalendar
(
name
)
{
/* This function is never to be called directly, but only indirectly
* using template/en/default/global/calendar.js.tmpl, so that localization
* works. For the same reason, if you modify this function's parameter list,
* you need to modify the documentation in said template as well. */
function
createCalendar
(
name
,
start_weekday
,
months_long
,
weekdays_short
)
{
var
cal
=
new
YAHOO
.
widget
.
Calendar
(
'calendar_'
+
name
,
'con_calendar_'
+
name
);
'con_calendar_'
+
name
,
{
START_WEEKDAY
:
start_weekday
,
MONTHS_LONG
:
months_long
,
WEEKDAYS_SHORT
:
weekdays_short
});
YAHOO
.
bugzilla
[
'calendar_'
+
name
]
=
cal
;
var
field
=
document
.
getElementById
(
name
);
cal
.
selectEvent
.
subscribe
(
setFieldFromCalendar
,
field
,
false
);
...
...
template/en/default/bug/field.html.tmpl
View file @
7298d324
...
...
@@ -56,8 +56,9 @@
<div id="con_calendar_[% field.name FILTER html %]"></div>
<script type="text/javascript">
createCalendar('[% field.name FILTER js %]')
</script>
<!--
[%+ PROCESS "global/calendar.js.tmpl" id = field.name %]
//--></script>
[% CASE constants.FIELD_TYPE_BUG_ID %]
<span id="[% field.name FILTER html %]_input_area">
<input name="[% field.name FILTER html %]" id="[% field.name FILTER html %]"
...
...
template/en/default/bug/summarize-time.html.tmpl
View file @
7298d324
...
...
@@ -332,10 +332,10 @@
</form>
<script type="text/javascript">
<!--
createCalendar('start_date');
createCalendar('end_date');
document.forms['summary'].start_date.focus();
//--></script>
<!--
[%+ PROCESS "global/calendar.js.tmpl" id = 'start_date' %]
[% PROCESS "global/calendar.js.tmpl" id = 'end_date' %]
document.forms['summary'].start_date.focus();
//--></script>
<hr noshade size=1>
[% END %]
template/en/default/global/calendar.js.tmpl
0 → 100644
View file @
7298d324
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%# INTERFACE:
# id: The id of the input field the calendar widget is to be assigned to.
#%]
[%# This template exists because createCalendar accepts additional parameters
# which allow for localization. Please see the YUI documentation at
# http://developer.yahoo.com/yui/calendar/#internationalization for details.
# As an example, here's what you'd specify as additional parameters to
# localize for German calendars; replace the ellipsis ("...") by the original
# parameter (we cannot put it into the example because it'd break this
# template comment):
#
# createCalendar(...
# /* The weekday the week begins on; 0 is Sunday,
# * 1 is Monday and so on: */
# 1,
# /* Months, full names; first must be January: */
# ['Januar', 'Februar', 'März', 'April',
# 'Mai', 'Juni', 'Juli', 'August',
# 'September', 'Oktober', 'November', 'Dezember'],
# /* Weekdays, two-letter abbreviations; first must be
# * Sunday: */
# ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']);
#%]
createCalendar('[% id FILTER js %]');
template/en/default/search/field.html.tmpl
View file @
7298d324
...
...
@@ -82,9 +82,10 @@
<span id="con_calendar_[% field.name FILTER html %]to"></span>
<script type="text/javascript">
createCalendar('[% field.name FILTER js %]');
createCalendar('[% field.name FILTER js %]to');
</script>
<!--
[%+ PROCESS "global/calendar.js.tmpl" id = field.name %]
[% PROCESS "global/calendar.js.tmpl" id = field.name _ 'to' %]
//--></script>
[% CASE [ constants.FIELD_TYPE_SINGLE_SELECT,
constants.FIELD_TYPE_MULTI_SELECT ] %]
<div id="container_[% field.name FILTER html %]" class="search_field_grid">
...
...
template/en/default/search/form.html.tmpl
View file @
7298d324
...
...
@@ -319,9 +319,10 @@ TUI_hide_default('information_query');
<div id="con_calendar_chfieldto"></div>
(YYYY-MM-DD or relative dates)
<script type="text/javascript">
createCalendar('chfieldfrom');
createCalendar('chfieldto');
</script>
<!--
[%+ PROCESS "global/calendar.js.tmpl" id = 'chfieldfrom' %]
[% PROCESS "global/calendar.js.tmpl" id = 'chfieldto' %]
//--></script>
</li>
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment