forked from guidone/node-red-contrib-chatbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chatbot-location.html
62 lines (58 loc) · 1.91 KB
/
chatbot-location.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<script type="text/javascript">
RED.nodes.registerType('chatbot-location', {
category: 'RedBot',
color: '#FFCC66',
defaults: {
name: {
value: ''
},
latitude: {
value: '',
validate: function(value) {
return value == null || $.trim(value) == '' || RED.validators.number()(value);
}
},
longitude: {
value: '',
validate: function(value) {
return value == null || $.trim(value) == '' || RED.validators.number()(value);
}
},
place: {
value: '',
required: false
}
},
inputs: 1,
outputs: 1,
paletteLabel: 'Location',
icon: 'chatbot-location.png',
label: function() {
return this.name || 'Location';
}
});
</script>
<script type="text/x-red" data-template-name="chatbot-location">
<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>
<div class="form-row">
<label for="node-input-name"><i class="icon-map-marker"></i> Latitude</label>
<input type="text" id="node-input-latitude" placeholder="Latitude" style="width: 30%;">
<input type="text" id="node-input-longitude" placeholder="Longitude" style="width: 30%;">
</div>
<div class="form-row">
<label for="node-input-place"><i class="icon-comment"></i> Place</label>
<input type="text" id="node-input-place" placeholder="Place">
<div style="max-width: 460px;font-size: 12px;color: #999999;line-height: 14px;margin-top:5px;">
Label next the map (for example the physical address <i>"corso Sempione, 12 Milano"</i>), only available for
transport <b>Facebook</b>
</div>
</div>
</script>
<script type="text/x-red" data-help-name="chatbot-location">
<p>
Sends location message with latitude and longitude coordinates, on the chat client that will be rendered with a map.
</p>
</script>