Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ui_event.html 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <script type="text/javascript">
  2. (function () {
  3. RED.nodes.registerType('ui-event', {
  4. category: RED._('@flowfuse/node-red-dashboard/ui-base:ui-base.label.category'),
  5. color: RED._('@flowfuse/node-red-dashboard/ui-base:ui-base.colors.darkest'),
  6. defaults: {
  7. ui: { type: 'ui-base', value: '', required: true },
  8. name: { value: '' }
  9. },
  10. inputs: 0,
  11. outputs: 1,
  12. icon: 'font-awesome/fa-arrow-circle-right',
  13. paletteLabel: 'event',
  14. oneditprepare: function () {
  15. // topic
  16. $('#node-input-topic').typedInput({
  17. default: 'str',
  18. typeField: $('#node-input-topicType'),
  19. types: ['str', 'msg', 'flow', 'global']
  20. })
  21. },
  22. label: function () {
  23. return this.name || 'ui-event'
  24. },
  25. labelStyle: function () { return this.name ? 'node_label_italic' : '' }
  26. })
  27. })()
  28. </script>
  29. <script type="text/html" data-template-name="ui-event">
  30. <div class="form-row">
  31. <label for="node-input-ui"><i class="fa fa-bookmark"></i> UI</label>
  32. <input type="text" id="node-input-ui">
  33. </div>
  34. <div class="form-row">
  35. <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
  36. <input type="text" id="node-input-name">
  37. </div>
  38. </script>