UNPKG

prisme-flow

Version:

prisme platform flow engine

70 lines (62 loc) 2.05 kB
<!-- Created by prisme.io on 09/06/2017. @author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io) --> <script type="text/javascript"> RED.nodes.registerType('bot-location', { category: 'bot', 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: 'location.png', label: function() { return this.name || 'Location'; } }); </script> <script type="text/x-red" data-template-name="bot-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="bot-location"> <p> Sends location message with latitude and longitude coordinates, on the chat client that will be rendered with a map. </p> </script>