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:
46fea6f
)
libs/cbi: fix dependency handling of radio buttons
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 26 Nov 2009 00:24:59 +0000
(
00:24
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 26 Nov 2009 00:24:59 +0000
(
00:24
+0000)
libs/cbi/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/cbi/htdocs/luci-static/resources/cbi.js
b/libs/cbi/htdocs/luci-static/resources/cbi.js
index bbea0f37da4afe49bb2b5ef3a108b561d6021df6..247228d225b47d6a3f15a88e3ecefae176153be7 100644
(file)
--- a/
libs/cbi/htdocs/luci-static/resources/cbi.js
+++ b/
libs/cbi/htdocs/luci-static/resources/cbi.js
@@
-45,7
+45,18
@@
function cbi_d_checkvalue(target, ref) {
var t = document.getElementById(target);
var value;
- if (!t || !t.value) {
+ if (!t) {
+ var tl = document.getElementsByName(target);
+
+ if( tl.length > 0 && tl[0].type == 'radio' )
+ for( var i = 0; i < tl.length; i++ )
+ if( tl[i].checked ) {
+ value = tl[i].value;
+ break;
+ }
+
+ value = value ? value : "";
+ } else if (!t.value) {
value = "";
} else {
value = t.value;