summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdescribecomponents.cgi7
-rw-r--r--extensions/BMO/template/en/default/global/choose-product.html.tmpl38
-rw-r--r--extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl13
-rw-r--r--skins/standard/reports.css5
-rw-r--r--template/en/default/reports/components.html.tmpl11
5 files changed, 45 insertions, 29 deletions
diff --git a/describecomponents.cgi b/describecomponents.cgi
index ee1361284..ed1f2388c 100755
--- a/describecomponents.cgi
+++ b/describecomponents.cgi
@@ -41,7 +41,9 @@ print $cgi->header();
# This script does nothing but displaying mostly static data.
Bugzilla->switch_to_shadow_db;
-my $product_name = trim($cgi->param('product') || '');
+my $product_name = trim($cgi->param('product') || '');
+my $component_mark = trim($cgi->param('component') || '');
+
my $product = new Bugzilla::Product({'name' => $product_name});
unless ($product && $user->can_access_product($product->name)) {
@@ -82,7 +84,8 @@ unless ($product && $user->can_access_product($product->name)) {
# End Data/Security Validation
######################################################################
-$vars->{'product'} = $product;
+$vars->{'product'} = $product;
+$vars->{'component_mark'} = $component_mark;
$template->process("reports/components.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
index 813a35725..b9cd02cfc 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -33,17 +33,18 @@
[% IF target == "enter_bug.cgi" %]
[% title = "Enter $terms.Bug" %]
- [% h2 = BLOCK %]First, you must pick a product on which to enter [% terms.abug %]. [% END %]
- [% yui = [ 'autocomplete' ] %]
- [% javascript_urls = [ "js/field.js", "js/create_bug.js",
- "extensions/BMO/web/js/prod_comp_search.js" ] %]
- [% onload = "YAHOO.util.Dom.get('prod_comp_search').focus();" %]
- [% style_urls.push("extensions/BMO/web/styles/prod_comp_search.css") %]
+ [% h2 = "Which product is affected by the problem you would like to report?" %]
[% ELSIF target == "describecomponents.cgi" %]
[% title = "Browse" %]
- [% h2 = "Please specify the product whose components you want described." %]
+ [% h2 = "Which product would you like to have described?" %]
[% END %]
+[% yui = [ 'autocomplete' ] %]
+[% javascript_urls = [ "js/field.js", "js/create_bug.js",
+ "extensions/BMO/web/js/prod_comp_search.js" ] %]
+[% onload = "YAHOO.util.Dom.get('prod_comp_search').focus();" %]
+[% style_urls.push("extensions/BMO/web/styles/prod_comp_search.css") %]
+
[% DEFAULT title = "Choose a Product" %]
[% PROCESS global/header.html.tmpl %]
@@ -57,20 +58,17 @@
</p>
<hr>
-<br>
+<h2>[% h2 FILTER html %]</h2>
+
+[% PROCESS "global/prod-comp-search.html.tmpl" %]
+
+<h2>or choose from the following selections</h2>
+
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% SET classification = cgi.param('classification') %]
[% IF NOT ((cgi.param("full")) OR (user.settings.product_chooser.value == 'full_product_chooser')) %]
-[% IF target == 'enter_bug.cgi' %]
-<h2>Which product is affected by the problem you would like to report?</h2>
-[% PROCESS "global/prod-comp-search.html.tmpl" %]
-<h2>or choose from the following selections</h2>
-[% ELSE %]
-<h2>[% h2 FILTER html %]</h2>
-[% END %]
-
<table align="center" border="0" width="600" cellpadding="5" cellspacing="0">
[% INCLUDE easyproduct
name="Core"
@@ -129,14 +127,6 @@
</table>
[% ELSE %]
-[% IF target == 'enter_bug.cgi' %]
-<h2>Which product is affected by the problem you would like to report?</h2>
-[% PROCESS "global/prod-comp-search.html.tmpl" %]
-<h2>or choose from the following selections</h2>
-[% ELSE %]
-<h2>[% h2 FILTER html %]</h2>
-[% END %]
-
<table>
[% FOREACH c = classifications %]
diff --git a/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl b/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl
index 8c120e9af..9e5e4da17 100644
--- a/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl
+++ b/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl
@@ -23,5 +23,18 @@
{
YAHOO.bugzilla.prodCompSearch.init(
"prod_comp_search", "prod_comp_search_autocomplete_container", "[% format FILTER js %]");
+ [% IF target == "describecomponents.cgi" %]
+ YAHOO.bugzilla.prodCompSearch.autoComplete.itemSelectEvent.subscribe(function (e, args) {
+ var oData = args[2];
+ var url = "describecomponents.cgi?product=" + encodeURIComponent(oData[0]) +
+ "&component=" + encodeURIComponent(oData[1]) +
+ "#" + encodeURIComponent(oData[1]);
+ var format = YAHOO.bugzilla.prodCompSearch.format;
+ if (format) {
+ url += "&format=" + encodeURIComponent(format);
+ }
+ window.location.href = url;
+ });
+ [% END %]
}
</script>
diff --git a/skins/standard/reports.css b/skins/standard/reports.css
index 00272fdba..205946550 100644
--- a/skins/standard/reports.css
+++ b/skins/standard/reports.css
@@ -90,3 +90,8 @@
color: #333;
}
+.component_hilite {
+ background-color: lightgreen;
+ margin: 0;
+ padding: 1em 0;
+}
diff --git a/template/en/default/reports/components.html.tmpl b/template/en/default/reports/components.html.tmpl
index ef7d5ae6d..b2a21ccc1 100644
--- a/template/en/default/reports/components.html.tmpl
+++ b/template/en/default/reports/components.html.tmpl
@@ -22,6 +22,7 @@
[%# INTERFACE:
# product: object. The product for which we want to display component
# descriptions.
+ # component: string. The name of the component to hilight in the browser
#%]
[% title = BLOCK %]
@@ -39,6 +40,8 @@
[% numcols = 2 %]
[% END %]
+<h2>[% mark FILTER html %]</h2>
+
<table cellpadding="0" cellspacing="0" id="components_header_table">
<tr>
<td class="instructions">
@@ -81,9 +84,11 @@
[%############################################################################%]
[% BLOCK describe_comp %]
- <tr id="[% comp.name FILTER html %]">
+ <tr id="[% comp.name FILTER html %]"
+ [%- IF comp.name == component_mark %] class="component_hilite"[% END %]>
<td rowspan="2" class="component_name">
- <a href="buglist.cgi?product=
+ <a name="[% comp.name FILTER html %]"
+ href="buglist.cgi?product=
[%- product.name FILTER uri %]&amp;component=
[%- comp.name FILTER uri %]&amp;resolution=---">
[% comp.name FILTER html %]</a>
@@ -97,7 +102,7 @@
</td>
[% END %]
</tr>
- <tr>
+ <tr[% IF comp.name == component_mark %] class="component_hilite"[% END %]>
<td colspan="[% numcols - 1 %]" class="component_description">
[% comp.description FILTER html_light %]
</td>