luci-base: cbi.js: remove dead code in cbi_validate_field()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
56249c867e
commit
e35fb36ea5
1 changed files with 1 additions and 12 deletions
|
@ -1117,10 +1117,7 @@ function cbi_validate_field(cbid, optional, type)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var cbiValidator = new CBIValidator(field, type, optional);
|
var cbiValidator = new CBIValidator(field, type, optional);
|
||||||
|
validatorFn = cbiValidator.validate.bind(cbiValidator);
|
||||||
validatorFn = function() {
|
|
||||||
return cbiValidator.validate();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
validatorFn = null;
|
validatorFn = null;
|
||||||
|
@ -1143,15 +1140,7 @@ function cbi_validate_field(cbid, optional, type)
|
||||||
field.addEventListener("click", validatorFn);
|
field.addEventListener("click", validatorFn);
|
||||||
}
|
}
|
||||||
|
|
||||||
field.setAttribute("cbi_validate", validatorFn);
|
|
||||||
field.setAttribute("cbi_datatype", type);
|
|
||||||
field.setAttribute("cbi_optional", (!!optional).toString());
|
|
||||||
|
|
||||||
validatorFn();
|
validatorFn();
|
||||||
|
|
||||||
var fcbox = document.getElementById('cbi.combobox.' + field.id);
|
|
||||||
if (fcbox)
|
|
||||||
cbi_validate_field(fcbox, optional, type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue