mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add checkbox support so config dialogs can save checkbox values
This commit is contained in:
parent
27e34f20fb
commit
5c39e330cb
@ -587,7 +587,12 @@ RED.editor = (function() {
|
|||||||
configNode = RED.nodes.node(configId);
|
configNode = RED.nodes.node(configId);
|
||||||
for (d in configTypeDef.defaults) {
|
for (d in configTypeDef.defaults) {
|
||||||
if (configTypeDef.defaults.hasOwnProperty(d)) {
|
if (configTypeDef.defaults.hasOwnProperty(d)) {
|
||||||
configNode[d] = $("#node-config-input-"+d).val();
|
var input = $("#node-config-input-"+d);
|
||||||
|
if (input.attr('type') === "checkbox") {
|
||||||
|
configNode[d] = input.prop('checked');
|
||||||
|
} else {
|
||||||
|
configNode[d] = input.val();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateConfigNodeSelect(configProperty,configType,configId);
|
updateConfigNodeSelect(configProperty,configType,configId);
|
||||||
|
Loading…
Reference in New Issue
Block a user