summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-09-25 18:34:42 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-09-25 18:34:42 +0200
commitb92f32dd334617e74ab931c1db1801cf1c2897ba (patch)
tree47d93475fb94fab18432cf9a5b2b6b6efc9add0a /template/en/default/search
parentb3abb29f2814bafd69095f3ef91bc40cbe5f866c (diff)
downloadbugzilla-b92f32dd334617e74ab931c1db1801cf1c2897ba.tar.gz
bugzilla-b92f32dd334617e74ab931c1db1801cf1c2897ba.tar.xz
Bug 1201266: Migrate YUI calendar to jQuery
r=gerv
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/field.html.tmpl37
-rw-r--r--template/en/default/search/form.html.tmpl28
-rw-r--r--template/en/default/search/search-advanced.html.tmpl1
-rw-r--r--template/en/default/search/search-create-series.html.tmpl1
-rw-r--r--template/en/default/search/search-report-graph.html.tmpl1
-rw-r--r--template/en/default/search/search-report-table.html.tmpl1
6 files changed, 22 insertions, 47 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">
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index 410bd2d20..30835b1b0 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -307,26 +307,18 @@ TUI_hide_default('information_query');
<li>
<label for="chfieldfrom">between:</label>
<input name="chfieldfrom" id="chfieldfrom" size="10"
- value="[% default.chfieldfrom.0 FILTER html %]" onchange="updateCalendarFromField(this)">
- <button type="button" class="calendar_button"
- id="button_calendar_chfieldfrom"
- onclick="showCalendar('chfieldfrom')"><span>Calendar</span></button>
- and
- <div id="con_calendar_chfieldfrom"></div>
- <input name="chfieldto" size="10" id="chfieldto"
- value="[% default.chfieldto.0 || "Now" FILTER html %]"
- onchange="updateCalendarFromField(this)">
- <button type="button" class="calendar_button"
- id="button_calendar_chfieldto"
- onclick="showCalendar('chfieldto')"><span>Calendar</span></button>
- <div id="con_calendar_chfieldto"></div>
+ value="[% default.chfieldfrom.0 FILTER html %]">
+ and
+ <input name="chfieldto" size="10" id="chfieldto"
+ value="[% default.chfieldto.0 || "Now" FILTER html %]">
(YYYY-MM-DD or relative dates)
<script type="text/javascript">
- <!--
- [%+ PROCESS "global/calendar.js.tmpl" id = 'chfieldfrom' %]
- [% PROCESS "global/calendar.js.tmpl" id = 'chfieldto' %]
- //--></script>
- </li>
+ $(function() {
+ $("#chfieldfrom").datepicker();
+ $("#chfieldto").datepicker();
+ });
+ </script>
+ </li>
</ul>
[%############################################################################%]
diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl
index af07aa475..ae4a72812 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -27,7 +27,6 @@ function remove_token() {
[% PROCESS global/header.html.tmpl
title = "Search for $terms.bugs"
generate_api_token = 1
- yui = [ 'calendar' ]
javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-create-series.html.tmpl b/template/en/default/search/search-create-series.html.tmpl
index 6df1a79d3..87be44f8c 100644
--- a/template/en/default/search/search-create-series.html.tmpl
+++ b/template/en/default/search/search-create-series.html.tmpl
@@ -19,7 +19,6 @@
[% PROCESS global/header.html.tmpl
title = "Create New Data Set"
onload = "doOnSelectProduct(0);"
- yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-report-graph.html.tmpl b/template/en/default/search/search-report-graph.html.tmpl
index 6cbafd11c..4f882ea0e 100644
--- a/template/en/default/search/search-report-graph.html.tmpl
+++ b/template/en/default/search/search-report-graph.html.tmpl
@@ -18,7 +18,6 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Graphical Report"
onload = "doOnSelectProduct(0); chartTypeChanged()"
- yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-report-table.html.tmpl b/template/en/default/search/search-report-table.html.tmpl
index 18c871313..09a8b18b8 100644
--- a/template/en/default/search/search-report-table.html.tmpl
+++ b/template/en/default/search/search-report-table.html.tmpl
@@ -18,7 +18,6 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Tabular Report"
onload = "doOnSelectProduct(0)"
- yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']