52 lines
1.5 KiB
HTML
52 lines
1.5 KiB
HTML
<script src="/liquidFlowHandler/menu.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType("liquidFlowHandler", {
|
|
category: "WWTP",
|
|
color: "#e4a363",
|
|
defaults: {
|
|
name: { value: "" },
|
|
},
|
|
inputs: 1,
|
|
outputs: 3,
|
|
inputLabels: ["input"],
|
|
outputLabels: ["process", "dbase", "parent"],
|
|
icon: "font-awesome/fa-random",
|
|
label: function() {
|
|
return this.name || "Liquid Flow Handler";
|
|
},
|
|
oneditprepare: function() {
|
|
// wait for the menu scripts to load
|
|
const waitForMenuData = () => {
|
|
if (window.EVOLV?.nodes?.liquidFlowHandler?.initEditor) {
|
|
window.EVOLV.nodes.liquidFlowHandler.initEditor(this);
|
|
} else {
|
|
setTimeout(waitForMenuData, 50);
|
|
}
|
|
};
|
|
waitForMenuData();
|
|
},
|
|
oneditsave: function() {
|
|
// save logger fields
|
|
if (window.EVOLV?.nodes?.liquidFlowHandler?.loggerMenu?.saveEditor) {
|
|
window.EVOLV.nodes.liquidFlowHandler.loggerMenu.saveEditor(this);
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="liquidFlowHandler">
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
</div>
|
|
|
|
<!-- Logger fields injected here -->
|
|
<div id="logger-fields-placeholder"></div>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="liquidFlowHandler">
|
|
<p>Liquid Flow Handler for handling multicomponent liquid flows</p>
|
|
</script>
|