summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl5
-rw-r--r--extensions/BMO/web/js/prod_comp_search.js13
2 files changed, 12 insertions, 6 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 9e5e4da17..2f1d67bec 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
@@ -22,7 +22,10 @@
&& YAHOO.bugzilla.prodCompSearch != null)
{
YAHOO.bugzilla.prodCompSearch.init(
- "prod_comp_search", "prod_comp_search_autocomplete_container", "[% format FILTER js %]");
+ "prod_comp_search",
+ "prod_comp_search_autocomplete_container",
+ "[% format FILTER js %]",
+ "[% cloned_bug_id FILTER js %]");
[% IF target == "describecomponents.cgi" %]
YAHOO.bugzilla.prodCompSearch.autoComplete.itemSelectEvent.subscribe(function (e, args) {
var oData = args[2];
diff --git a/extensions/BMO/web/js/prod_comp_search.js b/extensions/BMO/web/js/prod_comp_search.js
index c01b3c17f..ada296f52 100644
--- a/extensions/BMO/web/js/prod_comp_search.js
+++ b/extensions/BMO/web/js/prod_comp_search.js
@@ -9,6 +9,7 @@
YAHOO.bugzilla.prodCompSearch = {
counter : 0,
format : '',
+ cloned_bug_id : '',
dataSource : null,
autoComplete: null,
generateRequest : function (enteredText) {
@@ -41,11 +42,11 @@ YAHOO.bugzilla.prodCompSearch = {
fields : [ "product", "component" ]
};
},
- init : function( field, container, format) {
- if( this.dataSource == null ){
+ init : function(field, container, format, cloned_bug_id) {
+ if (this.dataSource == null)
this.init_ds();
- }
this.format = format;
+ this.cloned_bug_id = cloned_bug_id;
this.autoComplete = new YAHOO.widget.AutoComplete(field, container, this.dataSource);
this.autoComplete.generateRequest = this.generateRequest;
this.autoComplete.formatResult = this.resultListFormat;
@@ -70,9 +71,11 @@ YAHOO.bugzilla.prodCompSearch = {
var url = "enter_bug.cgi?product=" + encodeURIComponent(oData[0]) +
"&component=" + encodeURIComponent(oData[1]);
var format = YAHOO.bugzilla.prodCompSearch.format;
- if (format) {
+ if (format)
url += "&format=" + encodeURIComponent(format);
- }
+ var cloned_bug_id = YAHOO.bugzilla.prodCompSearch.cloned_bug_id;
+ if (cloned_bug_id)
+ url += "&cloned_bug_id=" + encodeURIComponent(cloned_bug_id);
window.location.href = url;
});
this.autoComplete.dataReturnEvent.subscribe(function(type, args) {