luci-base:adjust the code order
The `cbi_validate_field` should be after data initialized. Signed-off-by: Jian Chang <aa65535@live.com>
This commit is contained in:
parent
953d2814c8
commit
260a24aadb
1 changed files with 7 additions and 7 deletions
|
@ -523,13 +523,6 @@ function cbi_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes = document.querySelectorAll('[data-type]');
|
|
||||||
|
|
||||||
for (var i = 0, node; (node = nodes[i]) !== undefined; i++) {
|
|
||||||
cbi_validate_field(node, node.getAttribute('data-optional') === 'true',
|
|
||||||
node.getAttribute('data-type'));
|
|
||||||
}
|
|
||||||
|
|
||||||
nodes = document.querySelectorAll('[data-choices]');
|
nodes = document.querySelectorAll('[data-choices]');
|
||||||
|
|
||||||
for (var i = 0, node; (node = nodes[i]) !== undefined; i++) {
|
for (var i = 0, node; (node = nodes[i]) !== undefined; i++) {
|
||||||
|
@ -562,6 +555,13 @@ function cbi_init() {
|
||||||
cbi_dynlist_init(node, choices[2], choices[3], options);
|
cbi_dynlist_init(node, choices[2], choices[3], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nodes = document.querySelectorAll('[data-type]');
|
||||||
|
|
||||||
|
for (var i = 0, node; (node = nodes[i]) !== undefined; i++) {
|
||||||
|
cbi_validate_field(node, node.getAttribute('data-optional') === 'true',
|
||||||
|
node.getAttribute('data-type'));
|
||||||
|
}
|
||||||
|
|
||||||
cbi_d_update();
|
cbi_d_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue