65 lines
1.8 KiB
HTML
65 lines
1.8 KiB
HTML
<script src="/reactor/menu.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType("settler", {
|
|
category: "WWTP",
|
|
color: "#e4a363",
|
|
defaults: {
|
|
name: { value: "" },
|
|
TS_set: { value: 0.1, required: true },
|
|
inlet: { value: 1, required: true }
|
|
},
|
|
inputs: 1,
|
|
outputs: 3,
|
|
outputLabels: ["process", "dbase", "parent"],
|
|
icon: "font-awesome/fa-random",
|
|
label: function() {
|
|
return this.name || "Settling basin";
|
|
},
|
|
oneditprepare: function() {
|
|
// wait for the menu scripts to load
|
|
const waitForMenuData = () => {
|
|
if (window.EVOLV?.nodes?.reactor?.initEditor) {
|
|
window.EVOLV.nodes.reactor.initEditor(this);
|
|
} else {
|
|
setTimeout(waitForMenuData, 50);
|
|
}
|
|
};
|
|
waitForMenuData();
|
|
|
|
$("#node-input-inlet").typedInput({
|
|
type:"num",
|
|
types:["num"]
|
|
});
|
|
},
|
|
oneditsave: function() {
|
|
// save logger fields
|
|
if (window.EVOLV?.nodes?.reactor?.loggerMenu?.saveEditor) {
|
|
window.EVOLV.nodes.reactor.loggerMenu.saveEditor(this);
|
|
}
|
|
|
|
// save position field
|
|
if (window.EVOLV?.nodes?.measurement?.positionMenu?.saveEditor) {
|
|
window.EVOLV.nodes.rotatingMachine.positionMenu.saveEditor(this);
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="settler">
|
|
<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>
|
|
|
|
<!-- Position fields will be injected here -->
|
|
<div id="position-fields-placeholder"></div>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="settler">
|
|
<p>Settling tank</p>
|
|
</script> |