@parallaxcontrol/node-red-control
Version:
A comprehensive package of Node-RED nodes designed to seamlessly integrate with the Parallax Control Engine, offering enhanced control capabilities for AV Automation.
41 lines (38 loc) • 1.48 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('input-select', {
category: 'parallax',
color: '#C0C0C0',
defaults: {
name: {value: ""},
input: {value: "", required: true, validate: RED.validators.regex(/^(?!0+$)\d+$/)}
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-arrows-v",
label: function() {
return this.name || "input-select";
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/html" data-template-name="input-select">
<!-- name -->
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<!-- input number -->
<div class="form-row">
<label for="node-input-input"><i class="icon-tag"></i> Input</label>
<input type="number" id="node-input-input" placeholder="Enter the 1-based input to select">
</div>
<small id="inputHelpBlock" class="form-text text-muted">
Please enter a number greater than 0. Do not include letters or special characters.<br>
</small>
</script>
<script type="text/html" data-help-name="input-select">
<p>Helper Node: This node selects an input for selection on the next logic node.</p>
<p>[Expected: User-defined Input (1-based index number)]</p>
</script>