From 57376316c0c05652edda1a1e0622522fab2f59f3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 9 Jun 2021 11:15:53 +0800 Subject: [PATCH] sync --- docs/src/Roo_util_Format.js.html | 2 +- roojs-all.js | 2 +- roojs-core-debug.js | 2 +- roojs-core.js | 2 +- roojs-debug.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/Roo_util_Format.js.html b/docs/src/Roo_util_Format.js.html index febfd9b669..d5df702ec1 100644 --- a/docs/src/Roo_util_Format.js.html +++ b/docs/src/Roo_util_Format.js.html @@ -255,7 +255,7 @@ */ size : function(value, decimals) { - var sizes = ['b', 'k', 'm', 'g', 't']; + var sizes = ['b', 'k', 'M', 'G', 'T']; if (value == 0) { return 0; } diff --git a/roojs-all.js b/roojs-all.js index 8f917959a9..2f622db7e3 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -574,7 +574,7 @@ return eval(fn).apply(window,B);}else{return eval(fn).call(window,value);}},toFi 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})/;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,""); -},size:function(B,C){var D=['b','k','m','g','t'];if(B==0){return 0;}var i=parseInt(Math.floor(Math.log(B)/Math.log(1024)));return Roo.util.Format.number(B/Math.pow(1024,i),C)+D[i];}};}();Roo.util.Format.defaults={date:'d/M/Y'}; +},size:function(B,C){var D=['b','k','M','G','T'];if(B==0){return 0;}var i=parseInt(Math.floor(Math.log(B)/Math.log(1024)));return Roo.util.Format.number(B/Math.pow(1024,i),C)+D[i];}};}();Roo.util.Format.defaults={date:'d/M/Y'}; // Roo/MasterTemplate.js Roo.MasterTemplate=function(){Roo.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var st={};var m,re=this.subTemplateRe;re.lastIndex=0;var A=0;while(m=re.exec(this.html)){var B=m[1],C=m[2];st[A]={name:B,index:A,buffer:[],tpl:new Roo.Template(C)} ;if(B){st[B]=st[A];}st[A].tpl.compile();st[A].tpl.call=this.call.createDelegate(this);A++;}this.subCount=A;this.subs=st;};Roo.extend(Roo.MasterTemplate,Roo.Template,{subTemplateRe:/((?:.|\n)*?)<\/tpl>/gi,add:function(A,B){if(arguments.length==1){B=arguments[0]; diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 175b8c9ffa..cb3923e536 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -14000,7 +14000,7 @@ Roo.util.Format = function(){ */ size : function(value, decimals) { - var sizes = ['b', 'k', 'm', 'g', 't']; + var sizes = ['b', 'k', 'M', 'G', 'T']; if (value == 0) { return 0; } diff --git a/roojs-core.js b/roojs-core.js index 757c0de60a..32bf87b900 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -574,7 +574,7 @@ return eval(fn).apply(window,B);}else{return eval(fn).call(window,value);}},toFi 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})/;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,""); -},size:function(B,C){var D=['b','k','m','g','t'];if(B==0){return 0;}var i=parseInt(Math.floor(Math.log(B)/Math.log(1024)));return Roo.util.Format.number(B/Math.pow(1024,i),C)+D[i];}};}();Roo.util.Format.defaults={date:'d/M/Y'}; +},size:function(B,C){var D=['b','k','M','G','T'];if(B==0){return 0;}var i=parseInt(Math.floor(Math.log(B)/Math.log(1024)));return Roo.util.Format.number(B/Math.pow(1024,i),C)+D[i];}};}();Roo.util.Format.defaults={date:'d/M/Y'}; // Roo/MasterTemplate.js Roo.MasterTemplate=function(){Roo.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var st={};var m,re=this.subTemplateRe;re.lastIndex=0;var A=0;while(m=re.exec(this.html)){var B=m[1],C=m[2];st[A]={name:B,index:A,buffer:[],tpl:new Roo.Template(C)} ;if(B){st[B]=st[A];}st[A].tpl.compile();st[A].tpl.call=this.call.createDelegate(this);A++;}this.subCount=A;this.subs=st;};Roo.extend(Roo.MasterTemplate,Roo.Template,{subTemplateRe:/((?:.|\n)*?)<\/tpl>/gi,add:function(A,B){if(arguments.length==1){B=arguments[0]; diff --git a/roojs-debug.js b/roojs-debug.js index b106290d36..94b9ff7166 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -14000,7 +14000,7 @@ Roo.util.Format = function(){ */ size : function(value, decimals) { - var sizes = ['b', 'k', 'm', 'g', 't']; + var sizes = ['b', 'k', 'M', 'G', 'T']; if (value == 0) { return 0; } -- 2.39.2