1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

ensure trigger node detects changes to number of outputs

This commit is contained in:
Dave Conway-Jones 2020-06-05 11:22:38 +01:00
parent 16a634063a
commit ba8649117d
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -73,6 +73,7 @@
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"></input> <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"></input>
<input type="hidden" id="node-input-outputs" value="1">
</div> </div>
</script> </script>
@ -128,10 +129,10 @@
$("#node-input-second").change(function() { $("#node-input-second").change(function() {
if ($("#node-input-second").is(":checked")) { if ($("#node-input-second").is(":checked")) {
that.outputs = 2; $("#node-input-outputs").val(2);
} }
else { else {
that.outputs = 1; $("#node-input-outputs").val(1);
} }
}); });
$("#node-then-type").on("change", function() { $("#node-then-type").on("change", function() {
@ -140,7 +141,7 @@
$(".node-type-duration").hide(); $(".node-type-duration").hide();
$("#node-second-output").hide(); $("#node-second-output").hide();
$("#node-input-second").prop('checked', false); $("#node-input-second").prop('checked', false);
that.outputs = 1; $("#node-input-outputs").val(1);
} }
else if ($(this).val() == "loop") { else if ($(this).val() == "loop") {
if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); } if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); }
@ -148,7 +149,7 @@
$(".node-type-duration").show(); $(".node-type-duration").show();
$("#node-second-output").hide(); $("#node-second-output").hide();
$("#node-input-second").prop('checked', false); $("#node-input-second").prop('checked', false);
that.outputs = 1; $("#node-input-outputs").val(1);
} else { } else {
if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); } if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); }
$(".node-type-wait").show(); $(".node-type-wait").show();