X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=94b9ff7166aec9739299a61be7bb4cf2b2c55f48;hb=8946284bad10596673ce59afe8ef1ea49ba0b790;hp=4c9a82c533bd4e716e29b39675dd71fa20394be9;hpb=9da53a68d13d5f73e41052aa33a3b3b44d56e887;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 4c9a82c533..94b9ff7166 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -13991,6 +13991,7 @@ Roo.util.Format = function(){ stripTags : function(v){ return !v ? v : String(v).replace(this.stripTagsRE, ""); }, + /** * Size in Mb,Gb etc. * @param {Number} value The number to be formated @@ -14000,11 +14001,11 @@ Roo.util.Format = function(){ size : function(value, decimals) { var sizes = ['b', 'k', 'M', 'G', 'T']; - if (v == 0) { + if (value == 0) { return 0; } - var i = parseInt(Math.floor(Math.log(v) / Math.log(1024))); - return this.number(v / Math.pow(1024, i) ,decimals) + ' ' + sizes[i]; + var i = parseInt(Math.floor(Math.log(value) / Math.log(1024))); + return Roo.util.Format.number(value/ Math.pow(1024, i) ,decimals) + sizes[i]; }