1
0
Fork 0
forked from 0x2620/oxjs

fixing column resize bug

This commit is contained in:
rolux 2010-07-06 06:39:11 +02:00
commit cd1bde4348
2 changed files with 14 additions and 4 deletions

View file

@ -1267,8 +1267,10 @@ Ox.formatValue = function(num, str) {
>>> Ox.formatValue(123456789, "B")
???
*/
var val = "";
$.each(["K", "M", "G", "T", "P"], function(i, v) {
var arr = ["K", "M", "G", "T", "P"],
len = arr.length,
val = "";
$.each(arr, function(i, v) {
if (num < Math.pow(1024, i + 2) || i == len - 1) {
val = Ox.formatNumber(num / Math.pow(1024, i + 1), i) + " " + v + str;
return false;