Roo/bootstrap/MoneyField.js
authoredward <edward@roojs.com>
Mon, 23 Apr 2018 10:17:30 +0000 (18:17 +0800)
committeredward <edward@roojs.com>
Mon, 23 Apr 2018 10:17:30 +0000 (18:17 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/MoneyField.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 37a0f31..9295a9b 100644 (file)
@@ -220,7 +220,7 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
             this.collapse();
             return;
         }
-        
+        Roo.log('run on trigger click');
         if(this.triggerAction == 'all') {
             this.doQuery(this.allQuery, true);
             return;
@@ -229,63 +229,6 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
         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);
index 2aad3f9..e89614e 100644 (file)
@@ -39985,7 +39985,7 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
             this.collapse();
             return;
         }
-        
+        Roo.log('run on trigger click');
         if(this.triggerAction == 'all') {
             this.doQuery(this.allQuery, true);
             return;
index a8b922e..1a45db3 100644 (file)
@@ -1642,4 +1642,5 @@ if(this.indicatorpos=='right'){I.cls='roo-required-indicator text-danger fa fa-l
 }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);
+}});