Roo/bootstrap/MoneyField.js
authorjohn <john@roojs.com>
Thu, 18 Oct 2018 04:52:33 +0000 (12:52 +0800)
committerjohn <john@roojs.com>
Thu, 18 Oct 2018 04:52:33 +0000 (12:52 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index a7f0b0d..f681c79 100644 (file)
@@ -108,7 +108,7 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
             cls: 'hidden-number-input'
         };
         
-        if(!this.max_length) {
+        if(this.max_length) {
             input.maxlength = this.max_length; 
         }
         
index ef33dcf..376ccb1 100644 (file)
@@ -40516,7 +40516,7 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
             cls: 'hidden-number-input'
         };
         
-        if(!this.max_length) {
+        if(this.max_length) {
             input.maxlength = this.max_length; 
         }
         
index 0583df1..9588c9f 100644 (file)
@@ -1662,7 +1662,7 @@ var B="";for(var i=1;i<v.length;i++){var c=v.charAt(i);if(!isNaN(c)){B+=c;if(thi
 }this.setValue(this.getValue());}});
 // Roo/bootstrap/MoneyField.js
 Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.ComboBox,{allowDecimals:true,decimalSeparator:".",decimalPrecision:0,allowNegative:true,allowZero:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",castInt:true,defaultCurrency:false,thousandsDelimiter:false,max_length:false,inputlg:9,inputmd:9,inputsm:9,inputxs:6,store:false,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
-var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};var D={tag:'input',type:'hidden',id:Roo.id(),cls:'hidden-number-input'};if(!this.max_length){C.maxlength=this.max_length;
+var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};var D={tag:'input',type:'hidden',id:Roo.id(),cls:'hidden-number-input'};if(this.max_length){C.maxlength=this.max_length;
 }if(this.name){D.name=this.name;}if(this.disabled){C.disabled=true;}var E=12-this.inputlg;var F=12-this.inputmd;var G=12-this.inputsm;var H=12-this.inputxs;var I={tag:'div',cls:'row roo-money-field',cn:[{tag:'div',cls:'roo-money-currency column col-lg-'+E+' col-md-'+F+' col-sm-'+G+' col-xs-'+H,cn:[{tag:'div',cls:'roo-select2-container input-group',cn:[{tag:'input',cls:'form-control roo-money-currency-input',autocomplete:'new-password',readOnly:1,name:this.currencyName}
 ,{tag:'span',cls:'input-group-addon',cn:[{tag:'span',cls:'caret'}]}]}]},{tag:'div',cls:'roo-money-amount column col-lg-'+this.inputlg+' col-md-'+this.inputmd+' col-sm-'+this.inputsm+' col-xs-'+this.inputxs,cn:[{tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]}
 ]}]};if(this.fieldLabel.length){var J={tag:'i',tooltip:'This field is required'};var K={tag:'label','for':id,cls:'control-label',cn:[]};var L={tag:'span',html:this.fieldLabel};J.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';K.cn=[J,L];