X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fcbi%2Fhtdocs%2Fluci-static%2Fresources%2Fcbi.js;h=eb2420a1c1a27b0947221da8374b9ae65d90f54e;hb=4f354ea95a6388f4d363c0f07743085cf8a485de;hp=f70818e16e1a8c503ba67f3548efdcc665f9c636;hpb=64f835a291322f325c34e38f5f91c26ed91edcb2;p=project%2Fluci.git diff --git a/libs/cbi/htdocs/luci-static/resources/cbi.js b/libs/cbi/htdocs/luci-static/resources/cbi.js index f70818e16..eb2420a1c 100644 --- a/libs/cbi/htdocs/luci-static/resources/cbi.js +++ b/libs/cbi/htdocs/luci-static/resources/cbi.js @@ -24,11 +24,13 @@ function cbi_d_add(field, dep, next) { } } -function cbi_d_value(target) { +function cbi_d_checkvalue(target, ref) { var t = document.getElementById(target); var value - if (!t || !t.value) { + if (!t) { + return true + } else if (!t.value) { value = ""; } else { value = t.value; @@ -38,14 +40,14 @@ function cbi_d_value(target) { } } - return value + return (value == ref) } function cbi_d_check(deps) { for (var i=0; i