From: edward Date: Wed, 25 Apr 2018 08:35:11 +0000 (+0800) Subject: Roo/bootstrap/ComboBox.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=1cea307cbe7e734de5ceb535da760529ab67bcb5 Roo/bootstrap/ComboBox.js roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/Roo/bootstrap/ComboBox.js b/Roo/bootstrap/ComboBox.js index eeede96222..8b4ee82d74 100644 --- a/Roo/bootstrap/ComboBox.js +++ b/Roo/bootstrap/ComboBox.js @@ -1675,6 +1675,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { this.onLoad(); + Roo.log('onload???'); }else{ diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 948dcd3dc4..0be573d51f 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -14081,6 +14081,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { this.onLoad(); + Roo.log('onload???'); }else{ diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index b1cd83fe3d..3fa230ddb8 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -560,7 +560,7 @@ if(ct>0){if(this.selectedIndex==-1){this.select(0);}else if(this.selectedIndex0){this.inputEl().dom.value=this.lastSelectionText===undefined?'':this.lastSelectionText;}},doQuery:function(q,A){if(q===undefined||q===null){q='';}var qe={query:q,forceAll:A,combo:this,cancel:false} ;if(this.fireEvent('beforequery',qe)===false||qe.cancel){return false;}q=qe.query;A=qe.forceAll;if(A===true||(q.length>=this.minChars)){this.hasQuery=true;if(this.lastQuery!=q||this.alwaysQuery){this.lastQuery=q;if(this.mode=='local'){this.selectedIndex=-1; -if(A){this.store.clearFilter();}else{if(this.specialFilter){this.fireEvent('specialfilter',this);this.onLoad();return;}this.store.filter(this.displayField,q);}this.store.fireEvent("datachanged",this.store);this.onLoad();}else{this.store.baseParams[this.queryParam]=q; +if(A){this.store.clearFilter();}else{if(this.specialFilter){this.fireEvent('specialfilter',this);this.onLoad();return;}this.store.filter(this.displayField,q);}this.store.fireEvent("datachanged",this.store);this.onLoad();Roo.log('onload???');}else{this.store.baseParams[this.queryParam]=q; var B={params:this.getParams(q)};if(this.loadNext){B.add=true;B.params.start=this.page*this.pageSize;}this.store.load(B);}}else{this.selectedIndex=-1;this.onLoad();}}this.loadNext=false;},getParams:function(q){var p={};if(this.pageSize){p.start=0;p.limit=this.pageSize; }return p;},collapse:function(){if(!this.isExpanded()){return;}this.list.hide();this.hasFocus=false;if(this.tickable){this.okBtn.hide();this.cancelBtn.hide();this.trigger.show();if(this.editable){this.tickableInputEl().dom.value='';this.tickableInputEl().blur(); }}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 A=e.within(this.el);