From 61ab486097a60756792bc031c836f0e55393295c Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 30 May 2012 12:06:55 +0800 Subject: Bug 758141: add component searching to guided bug entry --- .../en/default/global/choose-product.html.tmpl | 2 +- extensions/BMO/web/js/choose_product.js | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'extensions/BMO') 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 @@
Type to find product and component by name or description
- +
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); -- cgit v1.2.3-24-g4f1b