From 3cc8e9491004868e6302339562c8266285236f54 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 26 Sep 2010 21:11:27 +0200 Subject: display correct file size when starting --- module/web/media/default/js/funktions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/web/media') diff --git a/module/web/media/default/js/funktions.js b/module/web/media/default/js/funktions.js index 882d569d9..c0f38b0bb 100644 --- a/module/web/media/default/js/funktions.js +++ b/module/web/media/default/js/funktions.js @@ -1,11 +1,11 @@ // JavaScript Document function HumanFileSize(size) { - var filesizename = new Array("KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"); + var filesizename = new Array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"); var loga = Math.log(size)/Math.log(1024); var i = Math.floor(loga); var a = Math.pow(1024, i); - return (size == 0) ? "0 KB" : (Math.round( size / a , 2) + " " + filesizename[i]); + return (size == 0) ? "0 B" : (Math.round( size / a , 2) + " " + filesizename[i]); } Array.prototype.remove = function(from, to) { -- cgit v1.2.3