forked from anerdins/node-red-contrib-nibepi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.html
executable file
·44 lines (42 loc) · 1.39 KB
/
input.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<script type="text/javascript">
RED.nodes.registerType('nibe-input',{
category: 'input',
color: '#e32222',
defaults: {
server: {value:"", type:"nibe-config"},
name: {value:""},
add: {value:false}
},
inputs:0,
outputs:2,
icon: "inject.svg",
label: function() {
return this.name||"NibePi In";
},
oneditsave: function() {
let node = this;
if ($('#node-input-add').is(':checked')) {
add = true;
} else {
add = false;
}
}
});
</script>
<script type="text/x-red" data-template-name="nibe-input">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Register</label>
<input type="text" id="node-input-name" placeholder="Register">
</div>
<div class="form-row">
<label for="node-input-add"><i class="icon-bookmark"></i> Add register</label>
<input type="checkbox" id="node-input-add">
</div>
<div class="form-row">
<label for="node-input-server"><i class="icon-tag"></i> Server</label>
<input type="text" id="node-input-server" placeholder="Server">
</div>
</script>
<script type="text/x-red" data-help-name="nibe-input">
<p>Test node for NibePi</p>
</script>