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/search/field.html.tmpl | |
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/search/field.html.tmpl')
-rw-r--r-- | template/en/default/search/field.html.tmpl | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl index b2013eff6..765ede557 100644 --- a/template/en/default/search/field.html.tmpl +++ b/template/en/default/search/field.html.tmpl @@ -55,34 +55,21 @@ tag_name = "span" editable = 1 %] - from <input name="[% field.name FILTER html %]from" - id="[% field.name FILTER html %]" - size="10" maxlength="10" - value="[% value.0 FILTER html %]" - onchange="updateCalendarFromField(this);[% onchange FILTER html %]"> - <button type="button" class="calendar_button" - id="button_calendar_[% field.name FILTER html %]" - onclick="showCalendar('[% field.name FILTER js %]')"> - <span>Calendar</span> - </button> - <span id="con_calendar_[% field.name FILTER html %]"></span> - to <input name="[% field.name FILTER html %]to" + from <input name="[% field.name FILTER html %]from" + id="[% field.name FILTER html %]" + size="10" maxlength="10" value="[% value.0 FILTER html %]"> + to <input name="[% field.name FILTER html %]to" id="[% field.name FILTER html %]to" size="10" maxlength="10" - value="[% value.1 FILTER html %]" - onchange="updateCalendarFromField(this);[% onchange FILTER html %]"> - <button type="button" class="calendar_button" - id="button_calendar_[% field.name FILTER html %]to" - onclick="showCalendar('[% field.name FILTER js %]to')"> - <span>Calendar</span> - </button> + value="[% value.1 FILTER html %]"> <small>(YYYY-MM-DD or relative dates)</small> - - <span id="con_calendar_[% field.name FILTER html %]to"></span> + <script type="text/javascript"> - <!-- - [%+ PROCESS "global/calendar.js.tmpl" id = field.name %] - [% PROCESS "global/calendar.js.tmpl" id = field.name _ 'to' %] - //--></script> + $(function() { + // do not check user input as relative dates are allowed + $("#[% field.name FILTER html FILTER js %]").datepicker({constrainInput: false}); + $("#[% field.name FILTER html FILTER js %]to").datepicker({constrainInput: false}); + }); + </script> [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, constants.FIELD_TYPE_MULTI_SELECT ] %] <div id="container_[% field.name FILTER html %]" class="search_field_grid"> |