1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

in the admin, show user mailbox sizes, fixes #210

This commit is contained in:
Joshua Tauberer
2014-10-07 20:24:11 +00:00
parent 443b084a17
commit 06a8ce1c9d
5 changed files with 72 additions and 23 deletions

View File

@@ -39,7 +39,12 @@ function nice_size(bytes) {
bytes /= 1024;
powers.shift();
}
return (Math.round(bytes*10)/10) + " " + powers[0];
// round to have three significant figures but at most one decimal place
if (bytes >= 100)
bytes = Math.round(bytes)
else
bytes = Math.round(bytes*10)/10;
return bytes + " " + powers[0];
}
function show_system_backup() {