diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-11-05 18:50:24 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-11-14 20:46:04 +0100 |
commit | e35fb36ea59e271aa9726a73783446977ac0166e (patch) | |
tree | 6b7aed0839210d0ead1991eea68331aabc1d9c43 /modules | |
parent | 56249c867ee8e6f8ba2dea20a2912428889a010b (diff) |
luci-base: cbi.js: remove dead code in cbi_validate_field()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 00eb53d7ba..9c8341cc54 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -1117,10 +1117,7 @@ function cbi_validate_field(cbid, optional, type) try { var cbiValidator = new CBIValidator(field, type, optional); - - validatorFn = function() { - return cbiValidator.validate(); - }; + validatorFn = cbiValidator.validate.bind(cbiValidator); } catch(e) { validatorFn = null; @@ -1143,15 +1140,7 @@ function cbi_validate_field(cbid, optional, type) field.addEventListener("click", validatorFn); } - field.setAttribute("cbi_validate", validatorFn); - field.setAttribute("cbi_datatype", type); - field.setAttribute("cbi_optional", (!!optional).toString()); - validatorFn(); - - var fcbox = document.getElementById('cbi.combobox.' + field.id); - if (fcbox) - cbi_validate_field(fcbox, optional, type); } } |