roojs-core.js
authorAlan Knowles <alan@roojs.com>
Thu, 21 Jun 2018 02:26:59 +0000 (10:26 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Jun 2018 02:26:59 +0000 (10:26 +0800)
roojs-core-debug.js
roojs-all.js
roojs-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js

roojs-all.js
roojs-bootstrap-debug.js
roojs-core-debug.js
roojs-core.js
roojs-debug.js

index 7f117d4..a764b0d 100644 (file)
@@ -565,7 +565,7 @@ Roo.util.Format=function(){var A=/^\s+|\s+$/g;return {ellipsis:function(B,C){if(
 },uppercase:function(B){return String(B).toUpperCase();},capitalize:function(B){return !B?B:B.charAt(0).toUpperCase()+B.substr(1).toLowerCase();},call:function(value,fn){if(arguments.length>2){var B=Array.prototype.slice.call(arguments,2);B.unshift(value);
 return eval(fn).apply(window,B);}else{return eval(fn).call(window,value);}},toFixed:function(v,n){if(!n){return Math.round(v-0);}var B=Math.pow(10,n+1);v=(Math.round((v-0)*B))/B;var z=(''+B).substring(2);if(v==Math.floor(v)){return Math.floor(v)+'.'+z;}var ps=String(v).split('.');
 var fd=(ps[1]+z);var r=fd.substring(0,n);var rm=fd.substring(n);if(rm<5){return ps[0]+'.'+r;}r*=1;r++;if(String(r).length!=n){ps[0]*=1;ps[0]++;r=String(r).substring(1);}return ps[0]+'.'+r;},usMoney:function(v){return '$'+Roo.util.Format.number(v);},number:function(v,B,C){B=typeof(B)=='undefined'?2:B;
-C=typeof(C)=='undefined'?',':C;var D=Math.pow(10,B);var E=String(D).substring(1);v=(Math.round((v-0)*D))/D;v=String(v);var ps=v.split('.');var F=ps[0];var r=/(\d+)(\d{3})/;while(r.test(F)){F=F.replace(r,'$1'+C+'$2');}var G=ps[1]?(B?('.'+ps[1]+E.substring(ps[1].length)):''):(B?('.'+E):'');
+C=typeof(C)=='undefined'?',':C;var D=Math.pow(10,B);var E=String(D).substring(1);v=(Math.round((v-0)*D))/D;v=String(v);var ps=v.split('.');var F=ps[0];var r=/(\d+)(\d{3})/;if(C.length!=0){F=F.replace(/\B(?=(\d{3})+(?!\d))/g,C);}var G=ps[1]?(B?('.'+ps[1]+E.substring(ps[1].length)):''):(B?('.'+E):'');
 return F+G;},date:function(v,B){if(!v){return "";}if(!(v instanceof Date)){v=new Date(Date.parse(v));}return v.dateFormat(B||Roo.util.Format.defaults.date);},dateRenderer:function(B){return function(v){return Roo.util.Format.date(v,B);};},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"");
 }};}();Roo.util.Format.defaults={date:'d/M/Y'};
 // Roo/MasterTemplate.js
index ad8ffcf..858b5aa 100644 (file)
@@ -7557,6 +7557,7 @@ Roo.form.Action.ACTION_TYPES = {
 
 
 Roo.bootstrap.Form = function(config){
+    
     Roo.bootstrap.Form.superclass.constructor.call(this, config);
     
     Roo.bootstrap.Form.popover.apply();
@@ -7591,7 +7592,6 @@ Roo.bootstrap.Form = function(config){
          */
         actioncomplete : true
     });
-
 };
 
 Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
@@ -8099,13 +8099,10 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             Roo.each(el.items,function(e) {
                 iter(e);
             });
-
-
         };
 
         iter(this);
         return r;
-        
     }
 
 });
index f3d38ca..eb23157 100644 (file)
@@ -13790,10 +13790,10 @@ Roo.util.Format = function(){
             
             var r = /(\d+)(\d{3})/;
             // add comma's
-            while (r.test(whole)) {
-                whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
-            }
             
+            if(thousandsDelimiter.length != 0) {
+                whole = whole.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsDelimiter );
+            } 
             
             var sub = ps[1] ?
                     // has decimals..
index b7a89ef..2d01b95 100644 (file)
@@ -565,7 +565,7 @@ Roo.util.Format=function(){var A=/^\s+|\s+$/g;return {ellipsis:function(B,C){if(
 },uppercase:function(B){return String(B).toUpperCase();},capitalize:function(B){return !B?B:B.charAt(0).toUpperCase()+B.substr(1).toLowerCase();},call:function(value,fn){if(arguments.length>2){var B=Array.prototype.slice.call(arguments,2);B.unshift(value);
 return eval(fn).apply(window,B);}else{return eval(fn).call(window,value);}},toFixed:function(v,n){if(!n){return Math.round(v-0);}var B=Math.pow(10,n+1);v=(Math.round((v-0)*B))/B;var z=(''+B).substring(2);if(v==Math.floor(v)){return Math.floor(v)+'.'+z;}var ps=String(v).split('.');
 var fd=(ps[1]+z);var r=fd.substring(0,n);var rm=fd.substring(n);if(rm<5){return ps[0]+'.'+r;}r*=1;r++;if(String(r).length!=n){ps[0]*=1;ps[0]++;r=String(r).substring(1);}return ps[0]+'.'+r;},usMoney:function(v){return '$'+Roo.util.Format.number(v);},number:function(v,B,C){B=typeof(B)=='undefined'?2:B;
-C=typeof(C)=='undefined'?',':C;var D=Math.pow(10,B);var E=String(D).substring(1);v=(Math.round((v-0)*D))/D;v=String(v);var ps=v.split('.');var F=ps[0];var r=/(\d+)(\d{3})/;while(r.test(F)){F=F.replace(r,'$1'+C+'$2');}var G=ps[1]?(B?('.'+ps[1]+E.substring(ps[1].length)):''):(B?('.'+E):'');
+C=typeof(C)=='undefined'?',':C;var D=Math.pow(10,B);var E=String(D).substring(1);v=(Math.round((v-0)*D))/D;v=String(v);var ps=v.split('.');var F=ps[0];var r=/(\d+)(\d{3})/;if(C.length!=0){F=F.replace(/\B(?=(\d{3})+(?!\d))/g,C);}var G=ps[1]?(B?('.'+ps[1]+E.substring(ps[1].length)):''):(B?('.'+E):'');
 return F+G;},date:function(v,B){if(!v){return "";}if(!(v instanceof Date)){v=new Date(Date.parse(v));}return v.dateFormat(B||Roo.util.Format.defaults.date);},dateRenderer:function(B){return function(v){return Roo.util.Format.date(v,B);};},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"");
 }};}();Roo.util.Format.defaults={date:'d/M/Y'};
 // Roo/MasterTemplate.js
index 0b41f11..49065fa 100644 (file)
@@ -13790,10 +13790,10 @@ Roo.util.Format = function(){
             
             var r = /(\d+)(\d{3})/;
             // add comma's
-            while (r.test(whole)) {
-                whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
-            }
             
+            if(thousandsDelimiter.length != 0) {
+                whole = whole.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsDelimiter );
+            } 
             
             var sub = ps[1] ?
                     // has decimals..