diff options
author | Byron Jones <bjones@mozilla.com> | 2012-05-30 06:06:55 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-05-30 06:06:55 +0200 |
commit | 61ab486097a60756792bc031c836f0e55393295c (patch) | |
tree | 98d674d833a08d7cedafde8c2349b091163f4459 /extensions/BMO | |
parent | ce8f837dcd1ccd23cd5f63f258efd257e3de70f3 (diff) | |
download | bugzilla-61ab486097a60756792bc031c836f0e55393295c.tar.gz bugzilla-61ab486097a60756792bc031c836f0e55393295c.tar.xz |
Bug 758141: add component searching to guided bug entry
Diffstat (limited to 'extensions/BMO')
-rw-r--r-- | extensions/BMO/template/en/default/global/choose-product.html.tmpl | 2 | ||||
-rw-r--r-- | extensions/BMO/web/js/choose_product.js | 21 |
2 files changed, 12 insertions, 11 deletions
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 159919169..d0d115621 100644 --- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl +++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl @@ -68,7 +68,7 @@ <div id="prod_comp_search_label"> Type to find product and component by name or description </div> - <input id="prod_comp_search" id="prod_comp_search" type="text" size="60"> + <input id="prod_comp_search" type="text" size="60"> <div id="prod_comp_search_autocomplete_container"></div> </div> </div> diff --git a/extensions/BMO/web/js/choose_product.js b/extensions/BMO/web/js/choose_product.js index 7298a6b92..507d1458b 100644 --- a/extensions/BMO/web/js/choose_product.js +++ b/extensions/BMO/web/js/choose_product.js @@ -10,6 +10,7 @@ YAHOO.bugzilla.prodCompSearch = { counter : 0, format : '', dataSource : null, + autoComplete: null, generateRequest : function (enteredText) { YAHOO.bugzilla.prodCompSearch.counter = YAHOO.bugzilla.prodCompSearch.counter + 1; YAHOO.util.Connect.setDefaultPostHeader('application/json', true); @@ -50,16 +51,16 @@ YAHOO.bugzilla.prodCompSearch = { this.init_ds(); } this.format = format; - var prodCompSearch = new YAHOO.widget.AutoComplete(field, container, this.dataSource); - prodCompSearch.generateRequest = this.generateRequest; - prodCompSearch.formatResult = this.resultListFormat; - prodCompSearch.minQueryLength = 3; - prodCompSearch.autoHighlight = false; - prodCompSearch.queryDelay = 0.05; - prodCompSearch.useIFrame = true; - prodCompSearch.maxResultsDisplayed = 25; - prodCompSearch.suppressInputUpdate = true; - prodCompSearch.textboxFocusEvent.subscribe(function () { + this.autoComplete = new YAHOO.widget.AutoComplete(field, container, this.dataSource); + this.autoComplete.generateRequest = this.generateRequest; + this.autoComplete.formatResult = this.resultListFormat; + this.autoComplete.minQueryLength = 3; + this.autoComplete.autoHighlight = false; + this.autoComplete.queryDelay = 0.05; + this.autoComplete.useIFrame = true; + this.autoComplete.maxResultsDisplayed = 25; + this.autoComplete.suppressInputUpdate = true; + this.autoComplete.textboxFocusEvent.subscribe(function () { var input = YAHOO.util.Dom.get(field); if (input.value && input.value.length > 3) { this.sendQuery(input.value); |