diff options
author | Simon | 2011-04-15 16:46:06 +0200 |
---|---|---|
committer | Simon | 2011-04-15 16:46:06 +0200 |
commit | 1dd3be2266c65f97985437efb47aeb21d9358300 (patch) | |
tree | 1363950c2cb2ecaa5b97592dcc5c112a16786d0c /application/modules/fbgui | |
parent | Downloadgeschwindigkeit wird auf ganzzahl angezeigt (diff) | |
download | pbs2-1dd3be2266c65f97985437efb47aeb21d9358300.tar.gz pbs2-1dd3be2266c65f97985437efb47aeb21d9358300.tar.xz pbs2-1dd3be2266c65f97985437efb47aeb21d9358300.zip |
Zahlenrundung beim Download angepasst
Diffstat (limited to 'application/modules/fbgui')
-rw-r--r-- | application/modules/fbgui/views/scripts/index/start.phtml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/application/modules/fbgui/views/scripts/index/start.phtml b/application/modules/fbgui/views/scripts/index/start.phtml index 2e78fb2..9b48fbf 100644 --- a/application/modules/fbgui/views/scripts/index/start.phtml +++ b/application/modules/fbgui/views/scripts/index/start.phtml @@ -108,12 +108,18 @@ function bytesToSize(bytes) { return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]]; } +if (!Number.toFixed) { + Number.prototype.toFixed=function(n){ + return Math.round(this*Math.pow(10, n)) / Math.pow(10, n); + } +} + function updateProgress(p, s, u){ $("#progressbar").progressbar({ value: ((actFile-1)*33+(p/3))}); if (p >= 0 && p <= 100){ $(".progressbar:last").progressbar({ value: p }); - $(".downloadelement .status:last").html("Downloading... "+p+"% - "+parseInt(s)+" "+u); + $(".downloadelement .status:last").html("Downloading... "+p+"% - "+(s.toFixed(2))+" "+u); }else{ $(".progressbar:last").progressbar({ value: 0 }); } |