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

Hide repeat send option if sending nothing

to address https://discourse.nodered.org/t/trigger-node-how-to-delay-and-repeat-message/74117/5
This commit is contained in:
Dave Conway-Jones 2023-01-25 10:59:04 +00:00
parent a607ee90e0
commit 9a856f50d7
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

View File

@ -25,7 +25,7 @@
<select id="node-then-type" style="width:70%;"> <select id="node-then-type" style="width:70%;">
<option value="block" data-i18n="trigger.wait-reset"></option> <option value="block" data-i18n="trigger.wait-reset"></option>
<option value="wait" data-i18n="trigger.wait-for"></option> <option value="wait" data-i18n="trigger.wait-for"></option>
<option value="loop" data-i18n="trigger.wait-loop"></option> <option id="node-trigger-wait-loop" value="loop" data-i18n="trigger.wait-loop"></option>
</select> </select>
</div> </div>
<div class="form-row node-type-duration"> <div class="form-row node-type-duration">
@ -181,6 +181,13 @@
$("#node-input-op2type").val('str'); $("#node-input-op2type").val('str');
} }
$("#node-input-op1").on("change", function() {
if ($("#node-input-op1type").val() === "nul") {
$("#node-trigger-wait-loop").hide();
}
else { $("#node-trigger-wait-loop").show(); }
});
var optionNothing = {value:"nul",label:this._("trigger.output.nothing"),hasValue:false}; var optionNothing = {value:"nul",label:this._("trigger.output.nothing"),hasValue:false};
var optionPayload = {value:"pay",label:this._("trigger.output.existing"),hasValue:false}; var optionPayload = {value:"pay",label:this._("trigger.output.existing"),hasValue:false};
var optionOriginalPayload = {value:"pay",label:this._("trigger.output.original"),hasValue:false}; var optionOriginalPayload = {value:"pay",label:this._("trigger.output.original"),hasValue:false};