mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
neopixel, hide menu options when not red
This commit is contained in:
parent
08164b5f9f
commit
3bdacd26e7
@ -19,14 +19,6 @@
|
||||
<label for="node-input-pixels"><i class="fa fa-sun-o"></i> LEDs</label>
|
||||
<input type="text" id="node-input-pixels" placeholder="number" style="width:60px;"> in the string
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-bgnd"><i class="fa fa-picture-o"></i> Background</label>
|
||||
<input type="text" id="node-input-bgnd" placeholder="HTML colour name or rrr,ggg,bbb">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-fgnd"><i class="fa fa-picture-o"></i> Foreground</label>
|
||||
<input type="text" id="node-input-fgnd" placeholder="HTML colour name or rrr,ggg,bbb">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-mode"><i class="fa fa-cogs"></i> Mode</label>
|
||||
<select id="node-input-mode" style="width:73%">
|
||||
@ -38,6 +30,14 @@
|
||||
<option value="shiftd">Add pixel to end</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row" id="bgcol">
|
||||
<label for="node-input-bgnd"><i class="fa fa-picture-o"></i> Background</label>
|
||||
<input type="text" id="node-input-bgnd" placeholder="HTML colour name or rrr,ggg,bbb">
|
||||
</div>
|
||||
<div class="form-row" id="fgcol">
|
||||
<label for="node-input-fgnd"><i class="fa fa-picture-o"></i> Foreground</label>
|
||||
<input type="text" id="node-input-fgnd" placeholder="HTML colour name or rrr,ggg,bbb">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-wipe"><i class="fa fa-clock-o"></i> Wipe time</label>
|
||||
<input type="text" id="node-input-wipe" placeholder="number" style="width:60px;"> mS
|
||||
@ -90,6 +90,20 @@
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
var setstate = function () {
|
||||
console.log($('#node-input-mode').val());
|
||||
if ($('#node-input-mode').val().indexOf("shift") !== -1) {
|
||||
$("#bgcol").hide();
|
||||
$("#fgcol").hide();
|
||||
} else {
|
||||
$("#bgcol").show();
|
||||
$("#fgcol").show();
|
||||
}
|
||||
};
|
||||
$("#node-input-mode").change(function () { setstate(); });
|
||||
setstate();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-pi-neopixel",
|
||||
"version" : "0.0.3",
|
||||
"version" : "0.0.5",
|
||||
"description" : "A Node-RED node to output to a neopixel (ws2812) string of LEDS from a Raspberry Pi.",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user