projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
831654f
)
libs/web: explicitely cast input value of %m pattern to float in order to avoid throw...
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Mar 2011 21:56:31 +0000
(21:56 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Mar 2011 21:56:31 +0000
(21:56 +0000)
libs/web/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/web/htdocs/luci-static/resources/cbi.js
b/libs/web/htdocs/luci-static/resources/cbi.js
index 41e75120620aaf7ac1e018e61f4c77575f820d9e..ddafd791805dfbfaa2ef0219ec0a01fedee1d164 100644
(file)
--- a/
libs/web/htdocs/luci-static/resources/cbi.js
+++ b/
libs/web/htdocs/luci-static/resources/cbi.js
@@
-1032,7
+1032,7
@@
if( ! String.format )
var pr = pPrecision ? Math.floor(10*parseFloat('0'+pPrecision)) : 2;
var i = 0;
- var val = (param || 0);
+ var val =
parseFloat
(param || 0);
var units = [ '', 'K', 'M', 'G', 'T', 'P', 'E' ];
for (i = 0; (i < units.length) && (val > mf); i++)