summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-07-18 15:51:12 +0200
committerByron Jones <bjones@mozilla.com>2012-07-18 15:51:12 +0200
commit64fe3a7a9e088b53fbd62066fad372ce9ac15c4e (patch)
tree12e49c8e3eaf443306a3e7ca6efd97448f507262 /extensions/BMO
parent839239cfe6c32515a04eea6068944a57cacda980 (diff)
downloadbugzilla-64fe3a7a9e088b53fbd62066fad372ce9ac15c4e.tar.gz
bugzilla-64fe3a7a9e088b53fbd62066fad372ce9ac15c4e.tar.xz
Bug 775068: product chooser breaks bug cloning
Diffstat (limited to 'extensions/BMO')
-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) {