summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 9728e03e12..aef64d577e 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -657,7 +657,11 @@ String.prototype.format = function()
for (i = 0; (i < units.length) && (val > mf); i++)
val /= mf;
- subst = (i ? val.toFixed(pr) : val) + units[i];
+ if (i)
+ subst = val.toFixed(pr) + units[i] + (mf == 1024 ? 'i' : '');
+ else
+ subst = val + ' ';
+
pMinLength = null;
break;
}