roojs-all.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 08:03:25 +0000 (16:03 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 08:03:25 +0000 (16:03 +0800)
roojs-all.js

index d10ddc8..9492024 100644 (file)
@@ -689,8 +689,8 @@ this.onLoad();}else {this.store.baseParams[this.queryParam]=q;this.store.load({p
 this.list.hide();Roo.get(document).un('mousedown',this.collapseIf,this);Roo.get(document).un('mousewheel',this.collapseIf,this);if(!this.editable){Roo.get(document).un('keydown',this.listKeyPress,this);}
 this.fireEvent('collapse',this);},collapseIf:function(e){if(!e.within(this.wrap)&&!e.within(this.list)){this.collapse();}},expand:function(){if(this.isExpanded()||!this.hasFocus){return;}
 this.list.alignTo(this.el,this.listAlign);this.list.show();Roo.get(document).on('mousedown',this.collapseIf,this);Roo.get(document).on('mousewheel',this.collapseIf,this);if(!this.editable){Roo.get(document).on('keydown',this.listKeyPress,this);}
-this.fireEvent('expand',this);},onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else {this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else {this.doQuery(this.getRawValue());}if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]);var C=this.store.getAt(ix);}
-this.store.each(function(v){if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){if(C&&C.id=v.id){return;}
+this.fireEvent('expand',this);},onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else {this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else {this.doQuery(this.getRawValue());}if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]);C=this.store.getAt(ix);}
+this.store.each(function(v){if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){if(C&&C.id==v.id){return;}
 A=this.store.indexOf(v);return false;}},this);if(A===false){return true;}
 this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0])
 sn.scrollIntoView(sn.dom.parentNode,false);}});