summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-02-17 16:33:34 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-02-17 16:33:34 +0100
commit99f5d4e902d6905b0c02819495922043b1f07637 (patch)
tree436bfce2760737868d79bd41773b85f278eb48d8 /modules/luci-base/htdocs/luci-static
parent21bf16ce04adaaa28811f96f4b29d6dc74c36ae6 (diff)
luci-base: cbi.js: properly round down numbers for %u and %d patterns
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index c084709f92..26fd92471f 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -1360,11 +1360,11 @@ String.prototype.format = function()
break;
case 'd':
- subst = (+param || 0);
+ subst = ~~(+param || 0);
break;
case 'u':
- subst = Math.abs(+param || 0);
+ subst = ~~Math.abs(+param || 0);
break;
case 'f':