From 5c39e330cbf8b6c44f06321b2a53502e78cd1efa Mon Sep 17 00:00:00 2001 From: jhr007 Date: Mon, 1 Sep 2014 03:11:10 -0500 Subject: [PATCH] Add checkbox support so config dialogs can save checkbox values --- public/red/ui/editor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index c8c36ca82..38f669ee9 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -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);