diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-09-25 18:34:42 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-09-25 18:34:42 +0200 |
commit | b92f32dd334617e74ab931c1db1801cf1c2897ba (patch) | |
tree | 47d93475fb94fab18432cf9a5b2b6b6efc9add0a /template/en/default/bug | |
parent | b3abb29f2814bafd69095f3ef91bc40cbe5f866c (diff) | |
download | bugzilla-b92f32dd334617e74ab931c1db1801cf1c2897ba.tar.gz bugzilla-b92f32dd334617e74ab931c1db1801cf1c2897ba.tar.xz |
Bug 1201266: Migrate YUI calendar to jQuery
r=gerv
Diffstat (limited to 'template/en/default/bug')
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/bug/field.html.tmpl | 21 | ||||
-rw-r--r-- | template/en/default/bug/show-header.html.tmpl | 1 | ||||
-rw-r--r-- | template/en/default/bug/summarize-time.html.tmpl | 34 |
4 files changed, 18 insertions, 40 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 367292756..e0fdd13b9 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -12,7 +12,7 @@ [% PROCESS global/header.html.tmpl title = title generate_api_token = 1 - yui = [ 'calendar', 'datatable', 'button' ] + yui = ['datatable', 'button'] style_urls = ['skins/standard/bug.css'] javascript_urls = [ "js/attachment.js", "js/util.js", "js/field.js", "js/TUI.js", "js/bug.js" ] diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 87725b699..fe649d50d 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -52,24 +52,15 @@ [% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %] [% size = (field.type == constants.FIELD_TYPE_DATE) ? 10 : 20 %] <input name="[% field.name FILTER html %]" size="[% size FILTER none %]" - id="[% field.name FILTER html %]" - value="[% value FILTER html %]" + id="[% field.name FILTER html %]" value="[% value FILTER html %]" [% IF field.is_mandatory %] data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %] - [% END %] - onchange="updateCalendarFromField(this)"> - <button type="button" class="calendar_button" - id="button_calendar_[% field.name FILTER html %]" - onclick="showCalendar('[% field.name FILTER js %]')"> - <span>Calendar</span> - </button> - - <div id="con_calendar_[% field.name FILTER html %]"></div> - + [% END %]> <script type="text/javascript"> - <!-- - [%+ PROCESS "global/calendar.js.tmpl" id = field.name %] - //--></script> + $(function() { + $("#[% field.name FILTER html FILTER js %]").datepicker([% "{constrainInput: false}" IF field.type == constants.FIELD_TYPE_DATETIME %]); + }); + </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 %]" diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 473df17da..da9d5f73b 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -24,7 +24,6 @@ [% END %] [% title = title _ filtered_desc %] [% generate_api_token = 1 %] -[% yui = [ 'calendar' ] %] [% yui.push('json', 'connection', 'container') IF user.can_tag_comments %] [% javascript_urls = [ "js/util.js", "js/field.js", "js/comments.js" ] %] [% javascript_urls.push("js/bug.js") IF user.id %] diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl index 9613eebf1..84eb75615 100644 --- a/template/en/default/bug/summarize-time.html.tmpl +++ b/template/en/default/bug/summarize-time.html.tmpl @@ -22,9 +22,7 @@ header = header style_urls = ['skins/standard/buglist.css'] doc_section = "using/editing.html#time-tracking" - yui = ['calendar'] - javascript_urls = [ "js/util.js", "js/field.js" ] - %] +%] [% INCLUDE query_form %] @@ -261,23 +259,19 @@ <label accesskey="s" for="start_date">Period <u>s</u>tarting</label>: </th> <td> - <input id="start_date" name="start_date" size="10" autofocus - value="[% start_date FILTER html %]" maxlength="10" - onchange="updateCalendarFromField(this)"> - <button type="button" class="calendar_button" id="button_calendar_start_date" - onclick="showCalendar('start_date')"><span>Calendar</span> - </button> - <div id="con_calendar_start_date"></div> + <input id="start_date" name="start_date" size="10" + value="[% start_date FILTER html %]" maxlength="10"> <span class="label"> and <label accesskey="e" for="end_date"><u>e</u>nding</label>: </span> - <input type="text" name="end_date" size="10" id="end_date" - value ="[% end_date FILTER html %]" maxlength="10" - onchange="updateCalendarFromField(this)"> - <button type="button" class="calendar_button" id="button_calendar_end_date" - onclick="showCalendar('end_date')"><span>Calendar</span> - </button> - <div id="con_calendar_end_date"></div> + <input id="end_date" name="end_date" size="10" + value ="[% end_date FILTER html %]" maxlength="10"> + <script type="text/javascript"> + $(function() { + $("#start_date").datepicker(); + $("#end_date").datepicker(); + }); + </script> <br> <span class="bz_info">(Dates are optional, and in YYYY-MM-DD format)</span> </td> @@ -321,11 +315,5 @@ </table> </form> -<script type="text/javascript"> - <!-- - [%+ PROCESS "global/calendar.js.tmpl" id = 'start_date' %] - [% PROCESS "global/calendar.js.tmpl" id = 'end_date' %] - //--> -</script> <hr> [% END %] |