diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-07-10 04:14:03 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-07-10 04:14:03 +0200 |
commit | a7c773b9c0aabf6c473c944ec885ba4975e28b4c (patch) | |
tree | 404321f144761100636c0a9251d0caf3f9d549a6 /extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl | |
parent | 108565f882b5fea273687ca32767b7c4d3e28ee8 (diff) | |
download | bugzilla-a7c773b9c0aabf6c473c944ec885ba4975e28b4c.tar.gz bugzilla-a7c773b9c0aabf6c473c944ec885ba4975e28b4c.tar.xz |
Bug 771739 - Implement the component search facility from the bmo extension on the browse (describe components) page
r=glob
Diffstat (limited to 'extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl')
-rw-r--r-- | extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl | 13 |
1 files changed, 13 insertions, 0 deletions
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> |