this.collapse();
return;
}
-
+ Roo.log('run on trigger click');
if(this.triggerAction == 'all') {
this.doQuery(this.allQuery, true);
return;
this.doQuery(this.getRawValue());
},
- collapse : function()
- {
- if(!this.isExpanded()){
- return;
- }
-
- 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);
-
- this.validate();
- },
-
- collapseIf : function(e)
- {
- var in_combo = e.within(this.el);
- var in_list = e.within(this.list);
- var is_list = (Roo.get(e.getTarget()).id == this.list.id) ? true : false;
-
- if (in_combo || in_list || is_list) {
- return;
- }
-
- this.collapse();
- },
-
- expand : function()
- {
- if(this.isExpanded()){
- return;
- }
-
- var lw = this.listWidth || Math.max(this.inputEl().getWidth(), this.minListWidth);
-
- this.list.setWidth(lw);
-
- this.list.show();
-
- this.restrictHeight();
-
- 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);
- },
-
restrictHeight : function()
{
this.list.alignTo(this.currencyEl, this.listAlign);
}if(this.labelxs>0){J.cls+=' col-xs-'+this.labelxs;H.cls+=' col-xs-'+(12-this.labelxs);}}}B.cn=[J,H];var L=this;['xs','sm','md','lg'].map(function(M){if(L[M]){B.cls+=' col-'+M+'-'+L[M];}});return B;},initEvents:function(){if(!this.store){throw "can not find store for combo";
}this.store=Roo.factory(this.store,Roo.data);this.store.parent=this;this.createList();this.indicator=this.indicatorEl();this.triggerEl=this.el.select('.input-group-addon',true).first();this.triggerEl.on("click",this.onTriggerClick,this,{preventDefault:true}
);this.currencyEl=this.el.select('.roo-money-currency-input',true).first();this.amountEl=this.el.select('.roo-money-amount-input',true).first();},onTriggerClick:function(e){if(this.disabled){return;}this.page=0;this.loadNext=false;if(this.isExpanded()){this.collapse();
-return;}if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);return;}this.doQuery(this.getRawValue());},restrictHeight:function(){this.list.alignTo(this.currencyEl,this.listAlign);this.list.alignTo(this.currencyEl,this.listAlign);}});
+return;}Roo.log('run on trigger click');if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);return;}this.doQuery(this.getRawValue());},restrictHeight:function(){this.list.alignTo(this.currencyEl,this.listAlign);this.list.alignTo(this.currencyEl,this.listAlign);
+}});