Roo/bootstrap/NumberField.js
authorjohn <john@roojs.com>
Thu, 7 Jun 2018 09:29:03 +0000 (17:29 +0800)
committerjohn <john@roojs.com>
Thu, 7 Jun 2018 09:29:03 +0000 (17:29 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 38845d9..de233a5 100644 (file)
@@ -87,7 +87,7 @@ Roo.extend(Roo.bootstrap.NumberField, Roo.bootstrap.Input, {
                 tag : 'input',
                 name : hidden_input_name,
                 type : 'hidden',
-                cls: 'form-hidden-field'
+                cls: 'form-hidden-field-number'
             })
         }
         
@@ -235,7 +235,7 @@ Roo.extend(Roo.bootstrap.NumberField, Roo.bootstrap.Input, {
     {
         Roo.log('die in here???');
         
-        return this.el.select('input.form-hidden-field',true).first();
+        return this.el.select('input.form-hidden-field-number',true).first();
     }
     
 });
index 71a26c1..dc066ac 100644 (file)
@@ -33060,7 +33060,7 @@ Roo.extend(Roo.bootstrap.NumberField, Roo.bootstrap.Input, {
                 tag : 'input',
                 name : hidden_input_name,
                 type : 'hidden',
-                cls: 'form-hidden-field'
+                cls: 'form-hidden-field-number'
             })
         }
         
@@ -33208,7 +33208,7 @@ Roo.extend(Roo.bootstrap.NumberField, Roo.bootstrap.Input, {
     {
         Roo.log('die in here???');
         
-        return this.el.select('input.form-hidden-field',true).first();
+        return this.el.select('input.form-hidden-field-number',true).first();
     }
     
 });
index b1823c8..a78fea1 100644 (file)
@@ -1386,14 +1386,14 @@ A.setHeight(A.getWidth()+A.getPadding('tb'));if(this.bgimage.length){var B=this.
 if(this.bgimage.length){this.el.select('.roo-brick-paragraph',true).first().setOpacity(0,true);this.el.select('.roo-brick-image-view',true).first().setOpacity(1,true);}}});
 // Roo/bootstrap/NumberField.js
 Roo.bootstrap.NumberField=function(A){Roo.bootstrap.NumberField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NumberField,Roo.bootstrap.Input,{allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative: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,allowThousandsDelimiter:false,thousandsDelimiter:",",getAutoCreate:function(){var A=this.name;
-this.name='';var B=Roo.bootstrap.NumberField.superclass.getAutoCreate.call(this);if(B.cn.length>0){B.cn.push({tag:'input',name:A,type:'hidden',cls:'form-hidden-field'})}return B;},initEvents:function(){Roo.bootstrap.NumberField.superclass.initEvents.call(this);
+this.name='';var B=Roo.bootstrap.NumberField.superclass.getAutoCreate.call(this);if(B.cn.length>0){B.cn.push({tag:'input',name:A,type:'hidden',cls:'form-hidden-field-number'})}return B;},initEvents:function(){Roo.bootstrap.NumberField.superclass.initEvents.call(this);
 var A="0123456789";if(this.allowDecimals){A+=this.decimalSeparator;}if(this.allowNegative){A+="-";}this.stripCharsRe=new RegExp('[^'+A+']','gi');var B=function(e){var k=e.getKey();var c=e.getCharCode();if((String.fromCharCode(c)=='.'||String.fromCharCode(c)=='-')&&A.indexOf(String.fromCharCode(c))===-1){e.stopEvent();
 return;}if(!Roo.isIE&&(e.isSpecialKey()||k==e.BACKSPACE||k==e.DELETE)){return;}if(A.indexOf(String.fromCharCode(c))===-1){e.stopEvent();}};this.el.on("keypress",B,this);},validateValue:function(A){if(!Roo.bootstrap.NumberField.superclass.validateValue.call(this,A)){return false;
 }var B=this.parseValue(A);if(isNaN(B)){this.markInvalid(String.format(this.nanText,A));return false;}if(B<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));return false;}if(B>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));
 return false;}return true;},getValue:function(){return this.fixPrecision(this.parseValue(Roo.bootstrap.NumberField.superclass.getValue.call(this)));},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?'':A;},fixPrecision:function(A){var B=isNaN(A);
 if(!this.allowDecimals||this.decimalPrecision==-1||B||!A){return B?'':A;}return parseFloat(A).toFixed(this.decimalPrecision);},setValue:function(v){v=this.fixPrecision(v);Roo.bootstrap.NumberField.superclass.setValue.call(this,String(v).replace(".",this.decimalSeparator));
 },decimalPrecisionFcn:function(v){return Math.floor(v);},beforeBlur:function(){if(!this.castInt){return;}var v=this.parseValue(this.getRawValue());if(v){this.setValue(v);}},addThousandsDelimiter:function(v){if(!this.allowThousandsDelimiter){return v;}v+="";
-var x=v.split(".");var x1=x[0];var x2=x.length>1?"."+x[1]:"";var A=/(\d+)(\d{3})/;while(A.test(x1)){x1=x1.replace(A,"$1"+this.thousandsDelimiter+"$2");}return x1+x2;},inputEl:function(){Roo.log('die in here???');return this.el.select('input.form-hidden-field',true).first();
+var x=v.split(".");var x1=x[0];var x2=x.length>1?"."+x[1]:"";var A=/(\d+)(\d{3})/;while(A.test(x1)){x1=x1.replace(A,"$1"+this.thousandsDelimiter+"$2");}return x1+x2;},inputEl:function(){Roo.log('die in here???');return this.el.select('input.form-hidden-field-number',true).first();
 }});
 // Roo/bootstrap/DocumentSlider.js
 Roo.bootstrap.DocumentSlider=function(A){Roo.bootstrap.DocumentSlider.superclass.constructor.call(this,A);this.files=[];this.addEvents({"initial":true,"update":true,"click":true});};Roo.extend(Roo.bootstrap.DocumentSlider,Roo.bootstrap.Component,{files:false,indicator:0,getAutoCreate:function(){var A={tag:'div',cls:'roo-document-slider',cn:[{tag:'div',cls:'roo-document-slider-header',cn:[{tag:'div',cls:'roo-document-slider-header-title'}