aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-05-07 17:58:22 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-05-07 17:58:22 +0200
commit92a81752931c5fd7cdbf4b63305389844193d029 (patch)
tree13cae837e5d0491e9ad5d6426b558de741d261eb /js
parent4e5dcf363dd1ffa63f0d7a190fa61891061ddea2 (diff)
downloadbugs-92a81752931c5fd7cdbf4b63305389844193d029.tar
bugs-92a81752931c5fd7cdbf4b63305389844193d029.tar.gz
bugs-92a81752931c5fd7cdbf4b63305389844193d029.tar.bz2
bugs-92a81752931c5fd7cdbf4b63305389844193d029.tar.xz
bugs-92a81752931c5fd7cdbf4b63305389844193d029.zip
Bug 616191: Implement UI to easily tag bugs from the bug report directly (and get rid of the current form in the footer)
r=timello a=LpSolit
Diffstat (limited to 'js')
-rw-r--r--js/field.js34
1 files changed, 18 insertions, 16 deletions
diff --git a/js/field.js b/js/field.js
index 9583db02c..1e5595081 100644
--- a/js/field.js
+++ b/js/field.js
@@ -870,27 +870,29 @@ YAHOO.bugzilla.userAutocomplete = {
}
};
-YAHOO.bugzilla.keywordAutocomplete = {
- dataSource : null,
- init_ds : function(){
- this.dataSource = new YAHOO.util.LocalDataSource( YAHOO.bugzilla.keyword_array );
+YAHOO.bugzilla.fieldAutocomplete = {
+ dataSource : [],
+ init_ds : function( field ) {
+ this.dataSource[field] =
+ new YAHOO.util.LocalDataSource( YAHOO.bugzilla.field_array[field] );
},
init : function( field, container ) {
- if( this.dataSource == null ){
- this.init_ds();
+ if( this.dataSource[field] == null ) {
+ this.init_ds( field );
}
- var keywordAutoComp = new YAHOO.widget.AutoComplete(field, container, this.dataSource);
- keywordAutoComp.maxResultsDisplayed = YAHOO.bugzilla.keyword_array.length;
- keywordAutoComp.minQueryLength = 0;
- keywordAutoComp.useIFrame = true;
- keywordAutoComp.delimChar = [","," "];
- keywordAutoComp.resultTypeList = false;
- keywordAutoComp.queryDelay = 0;
- /* Causes all the possibilities in the keyword to appear when a user
+ var fieldAutoComp =
+ new YAHOO.widget.AutoComplete(field, container, this.dataSource[field]);
+ fieldAutoComp.maxResultsDisplayed = YAHOO.bugzilla.field_array[field].length;
+ fieldAutoComp.minQueryLength = 0;
+ fieldAutoComp.useIFrame = true;
+ fieldAutoComp.delimChar = [","," "];
+ fieldAutoComp.resultTypeList = false;
+ fieldAutoComp.queryDelay = 0;
+ /* Causes all the possibilities in the field to appear when a user
* focuses on the textbox
*/
- keywordAutoComp.textboxFocusEvent.subscribe( function(){
- var sInputValue = YAHOO.util.Dom.get('keywords').value;
+ fieldAutoComp.textboxFocusEvent.subscribe( function(){
+ var sInputValue = YAHOO.util.Dom.get(field).value;
if( sInputValue.length === 0 ){
this.sendQuery(sInputValue);
this.collapseContainer();