Commit 9fd85730 authored by Guy Pyrzak's avatar Guy Pyrzak

Bug 450301: What Simplify searching UI, initial improvements to the advanced search ui.

r=mkanat, a=mkanat
parent 99ad6a4e
......@@ -64,7 +64,7 @@ sub get_param_list {
{
name => 'defaultquery',
type => 't',
default => 'bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=Importance&long_desc_type=substring'
default => 'bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&emaillongdesc3=1&order=Importance&long_desc_type=substring'
},
{
......
......@@ -372,7 +372,7 @@ sub init {
}
}
foreach my $id ("1", "2") {
foreach my $id (1, 2, 3) {
if (!defined ($params->param("email$id"))) {
next;
}
......
......@@ -68,6 +68,7 @@ function TUI_hide_default(className) {
function _TUI_toggle_control_link(className) {
var link = document.getElementById(className + "_controller");
if (!link) return;
var original_text = link.innerHTML;
link.innerHTML = TUI_alternates[className];
TUI_alternates[className] = original_text;
......@@ -93,14 +94,14 @@ function _TUI_store(aClass, state) {
}
function _TUI_restore() {
var classes = YAHOO.util.Cookie.getSubs(TUI_COOKIE_NAME);
for (item in classes) {
if (classes[item] == 0) {
var elements = YAHOO.util.Dom.getElementsByClassName(item);
var yui_classes = YAHOO.util.Cookie.getSubs(TUI_COOKIE_NAME);
for (yui_item in yui_classes) {
if (yui_classes[yui_item] == 0) {
var elements = YAHOO.util.Dom.getElementsByClassName(yui_item);
for (var i = 0; i < elements.length; i++) {
YAHOO.util.Dom.addClass(elements[i], 'bz_tui_hidden');
}
_TUI_toggle_control_link(item);
_TUI_toggle_control_link(yui_item);
}
}
}
......
......@@ -44,3 +44,9 @@ form#Create #comp_desc {
#footer .links {
display: inline;
}
#bug_id_container, .search_field_grid,
.search_email_fields, ul.bug_changes li {
zoom: 1;
display: inline;
}
\ No newline at end of file
/* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Bugzilla Bug Tracking System.
*
* The Initial Developer of the Original Code is Guy Pyrzak
* Portions created by the Initial Developer are Copyright (C) 2010 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Guy Pyrzak <guy.pyrzak@gmail.com>
*/
#bug_id_container {
display: inline-block;
vertical-align: middle;
}
.search_field_grid {
margin-top: 1em;
display: inline-block;
}
.search_field_grid .field_help_link,
.history_query .field_help_link
{
display: block;
text-align: left;
}
#chart .section_help {
font-size: 0.8em;
font-weight: normal
}
#bug_id_container .field_help {
font-size: 0.75em
}
.search_field_row {
display: block;
padding: 0.5ex 0;
vertical-align: top;
}
.search_field_grid label {
display: block;
}
.search_field_grid select {
width: 17em;
height: 15ex;
}
.search_field_grid, .search_field_row {
padding-left: 1.5em;
}
.search_email_fields {
display: inline-block;
width: 14.5em;
padding-left: 1.5em;
}
ul.bug_changes {
margin: 0;
padding: 0;
}
ul.bug_changes li {
display: inline-block;
width: 14.5em;
vertical-align: top;
padding-left: 1.5em;
}
ul.bug_changes select {
width: 15em;
}
ul.bug_changes li label {
display: block;
}
div.bz_section_title {
display: block;
margin-top: 2em;
font-size: 1.2em;
}
div.bz_section_title a {
font-weight: bold;
}
div.bz_section_title span {
font-size: 0.75em;
margin-left: 1em;
}
#summary_field {
margin: 0;
padding: 0;
}
#summary_field label {
margin-right: 2em;
font-weight: bold;
display: inline;
}
.hide_people_filter #people_filter_section,
.hide_history_filter #history_filter_section,
.hide_detailed_information #detailed_information_section
{
display: none;
}
.arrow {
display: inline;
width: 16px;
height: 16px;
}
.bz_search_section, ul.bz_search_section {
margin-top: 1em;
}
\ No newline at end of file
......@@ -23,14 +23,15 @@
# desc_url: An alternate link to help for the field.
# hidden: True if the field label should start hidden.
# rowspan: a "rowspan" value for the label's <th>.
# tag_name: the tag to use to surround the label
#%]
[% PROCESS "bug/field-help.none.tmpl" %]
<th class="field_label [% ' bz_hidden_field' IF hidden %]
[% DEFAULT tag_name = "th" %]
<[% tag_name %] class="field_label [% ' bz_hidden_field' IF hidden %]
[%- ' required' IF field.is_mandatory %]"
id="field_label_[% field.name FILTER html %]"
[% IF rowspan %] rowspan="[% rowspan FILTER html %]"[% END %]>
[% IF rowspan > 0 %] rowspan="[% rowspan FILTER html %]"[% END %]>
[% IF editable %]
<label for="[% field.name FILTER html %]">
......@@ -49,4 +50,4 @@
>[%- field_descs.${field.name} FILTER html %]:</a>
[% '</label>' IF editable %]
</th>
</[% tag_name %]>
......@@ -59,7 +59,6 @@
'search/boolean-charts.html.tmpl' => [
'"field${chartnum}-${rownum}-${colnum}"',
'"value${chartnum}-${rownum}-${colnum}"',
'field.name',
'"${chartnum}-${rownum}-${newor}"',
'"${chartnum}-${newand}-0"',
......@@ -70,10 +69,6 @@
'search/form.html.tmpl' => [
'qv.name',
'qv.description',
'field.name',
'field.description',
'field.accesskey',
'sel.name',
],
'search/search-specific.html.tmpl' => [
......
......@@ -50,7 +50,9 @@
] %]
<h3 id="chart">
Advanced Searching Using Boolean Charts
Custom Search <span class="section_help">Didn't find what
you're looking for above? This area allows for ANDs, ORs
and other more complex searches.</span>
</h3>
[%# Whoever wrote the original version of boolean charts had a seriously twisted mind %]
......@@ -87,9 +89,8 @@
[% INCLUDE "search/type-select.html.tmpl"
name = "type${chartnum}-${rownum}-${colnum}",
types = types, selected = col.type %]
<input name="[% "value${chartnum}-${rownum}-${colnum}" %]"
value="[% col.value FILTER html %]">
value="[% col.value FILTER html %]">
</td>
[% UNLESS loop.last %]
......
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Guy Pyrzak
# Portions created by the Initial Developer are Copyright (C) 2010 the
# Initial Developer. All Rights Reserved.
#
# Contributor(s): Guy Pyrzak <guy.pyrzak@gmail.com>
#
#%]
[%# INTERFACE:
# field: a Bugzilla::Field object
# value: the value or values that should be used to prepopulate the field
# accesskey: the access key used to access the field more quickly
# onchange: js to run when the change event fires on the field
# type_selected: used by the free text to indicate which type of text
# search was selected for a particular field
#%]
[% SWITCH field.type %]
[% CASE [ constants.FIELD_TYPE_FREETEXT,
constants.FIELD_TYPE_TEXTAREA,
constants.FIELD_TYPE_UNKNOWN ] %]
[% INCLUDE "bug/field-label.html.tmpl"
field = field
tag_name = "span"
editable = 1
%]
[% INCLUDE "search/type-select.html.tmpl"
name = field.name _ "_type",
types = types,
selected = type_selected %]
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
value="[% value FILTER html %]">
[% CASE constants.FIELD_TYPE_DATETIME %]
[% INCLUDE "bug/field-label.html.tmpl"
field = field
tag_name = "span"
editable = 1
%]
from <input name="[% field.name %]from"
id="[% field.name %]"
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>
<div id="con_calendar_[% field.name FILTER html %]"></div>
to <input name="[% field.name %]to"
id="[% field.name %]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>
<small>(YYYY-MM-DD or relative dates)</small>
<div id="con_calendar_[% field.name FILTER html %]to"></div>
<script type="text/javascript">
createCalendar('[% field.name FILTER js %]');
createCalendar('[% field.name FILTER js %]to');
</script>
[% CASE [ constants.FIELD_TYPE_SINGLE_SELECT,
constants.FIELD_TYPE_MULTI_SELECT ] %]
<div id="container_[% field.name FILTER html %]" class="search_field_grid">
[% INCLUDE "bug/field-label.html.tmpl"
field = field
editable = 1
tag_name = "span"
%]
<select name="[% field.name FILTER html%]"
id="[% field.name FILTER html %]"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
multiple="multiple" size="7">
[% legal_values = ${field.name} %]
[% IF field.name == "component" %]
[% legal_values = ${"component_"} %]
[% END %]
[% FOREACH current_value = legal_values %]
[% IF current_value.id %]
[%# current_value is a hash instead of a value which
only applies for Resolution really, everywhere else current_value
is just the value %]
[% v = current_value.name OR '---' -%]
<option value="[% v FILTER html %]"
[% ' selected="selected"' IF value.contains( v ) %]>
[% display_value(field.name, current_value.name) FILTER html %]
</option>
[% ELSE %]
<option value="[% current_value OR '---' FILTER html %]"
[% ' selected="selected"' IF value.contains( current_value ) %]>
[% display_value(field.name, current_value) FILTER html %]
</option>
[% END %]
[% END %]
</select>
</div>
[% END %]
\ No newline at end of file
......@@ -38,8 +38,10 @@ var queryform = "queryform"
title = "Search for $terms.bugs"
onload = "doOnSelectProduct(0); enableHelp();"
javascript = js_data
javascript_urls = [ "js/productform.js" "js/util.js" "js/help.js" ]
style_urls = [ "skins/standard/help.css" ]
javascript_urls = [ "js/yui/calendar.js", "js/productform.js", "js/util.js",
"js/help.js" , "js/TUI.js", "js/field.js"]
style_urls = [ "skins/standard/help.css" , "skins/standard/search_form.css",
"skins/standard/yui/calendar.css" ]
doc_section = "query.html"
style = "dl.bug_changes dt {
margin-top: 15px;
......
......@@ -34,7 +34,8 @@
title = "Create New Data Set"
onload = "doOnSelectProduct(0);"
javascript = js_data
javascript_urls = [ "js/productform.js" ]
javascript_urls = [ "js/yui/calendar.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/search_form.css" ]
doc_section = "reporting.html#charts-new-series"
%]
......
......@@ -33,7 +33,8 @@ var queryform = "reportform"
title = "Generate Graphical Report"
onload = "doOnSelectProduct(0); chartTypeChanged()"
javascript = js_data
javascript_urls = [ "js/productform.js" ]
javascript_urls = [ "js/yui/calendar.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/search_form.css" ]
doc_section = "reporting.html#reports"
%]
......
......@@ -33,7 +33,8 @@ var queryform = "reportform"
title = "Generate Tabular Report"
onload = "doOnSelectProduct(0)"
javascript = js_data
javascript_urls = [ "js/productform.js" ]
javascript_urls = [ "js/yui/calendar.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/search_form.css" ]
doc_section = "reporting.html#reports"
%]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment