1
0
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:
jhr007 2014-09-01 03:11:10 -05:00 committed by John Robinson
parent 27e34f20fb
commit 5c39e330cb

View File

@ -587,7 +587,12 @@ RED.editor = (function() {
configNode = RED.nodes.node(configId);
for (d in configTypeDef.defaults) {
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);