-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsmartfritz.html
More file actions
108 lines (103 loc) · 3.41 KB
/
Copy pathsmartfritz.html
File metadata and controls
108 lines (103 loc) · 3.41 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<script type="text/javascript">
RED.nodes.registerType("smartfritz-config", {
category: "config",
defaults: {
name: {value:"", required: false},
fritzip: {value:"192.168.178.1", required: true}
},
credentials: {
username: {type: "text"},
password: {type: "password"}
},
label: function() {
// ist das hier so in Ordnung?????
return this.name ? this.name : "Smartfritz Config";
},
oneditprepare:function() {
if(!$('#node-config-input-username').val())
{
$('#node-config-input-username').val('admin');
}
}
});
</script>
<script type="text/x-red" data-template-name="smartfritz-config">
<div class="form-row">
<label for="node-config-input-name"><i class="icon-bookmark"></i>Name</label>
<input type="text" id="node-config-input-name" />
</div>
<div class="form-row">
<label for="node-config-input-fritzip"><i class="icon-bookmark"></i>IP</label>
<input type="text" id="node-config-input-fritzip" />
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="icon-bookmark"></i>User (opt.)</label>
<input type="text" id="node-config-input-username" />
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="icon-bookmark"></i>Password</label>
<input type="password" id="node-config-input-password" />
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("fritz write", {
category: "function",
color: "#268edf",
defaults: {
config: {type:"smartfritz-config", required:true},
name: {value:"", required: false},
aid : {value:"0", required: false}
},
inputs:1,
outputs:1,
icon: "smartfritz.png",
label: function() {
return this.name ? this.name : "fritz write";
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType("fritz read", {
category: "function",
color: "#268edf",
defaults: {
config: {type:"smartfritz-config", required:true},
name: {value:"", required: false},
aid : {value:"0", required: false}
},
inputs:1,
outputs:1,
icon: "smartfritz.png",
label: function() {
return this.name ? this.name : "fritz read";
}
});
</script>
<script type="text/x-red" data-template-name="fritz write">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i>Config</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-bookmark"></i>Name</label>
<input type="text" id="node-input-name" />
</div>
<div class="form-row">
<label for="node-input-aid"><i class="icon-bookmark"></i>AID (opt.)</label>
<input type="text" id="node-input-aid"/>
</div>
</script>
<script type="text/x-red" data-template-name="fritz read">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i>Config</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-bookmark"></i>Name</label>
<input type="text" id="node-input-name" />
</div>
<div class="form-row">
<label for="node-input-aid"><i class="icon-bookmark"></i>AID (opt.)</label>
<input type="text" id="node-input-aid"/>
</div>
</script>