diff options
author | Byron Jones <bjones@mozilla.com> | 2012-07-18 15:51:12 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-07-18 15:51:12 +0200 |
commit | 64fe3a7a9e088b53fbd62066fad372ce9ac15c4e (patch) | |
tree | 12e49c8e3eaf443306a3e7ca6efd97448f507262 /extensions/BMO/web/js | |
parent | 839239cfe6c32515a04eea6068944a57cacda980 (diff) | |
download | bugzilla-64fe3a7a9e088b53fbd62066fad372ce9ac15c4e.tar.gz bugzilla-64fe3a7a9e088b53fbd62066fad372ce9ac15c4e.tar.xz |
Bug 775068: product chooser breaks bug cloning
Diffstat (limited to 'extensions/BMO/web/js')
-rw-r--r-- | extensions/BMO/web/js/prod_comp_search.js | 13 |
1 files changed, 8 insertions, 5 deletions
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) { |