Einstellungen aus Dateisystem
Die Konfiguration kann auch als JSON im Dateisystem abgespeichert werden.
context.enableModules();
const { TableMonitor } = require("ou.sp.gadget.TableMonitor");
// Windows
context.returnValue = TableMonitor.show("D:\\EASY\\Workflow-ext\\config\\tableMonitor-default.json")
// Linux
context.returnValue = TableMonitor.show("/usr/share/documents5-ext/config/tableMonitor-default.json")
Beispiel-JSON: tableMonitor-default.json
{
"fieldName": "jsonMonitorField",
"columns": {
"icon": {
"type": "icon",
"label": "",
"attributes": {
"style": "width: 20px"
}
},
"id": {
"label": "Kreditorennummer",
"required": true,
"attributes": {
"class": "cell-id"
}
}
},
"buttons": {
"add": {
"label": "Hinzufügen",
"click": "buttonAddClick"
},
"copy": {
"label": "Kopieren",
"tooltip": "Zeile kopieren",
"click": "buttonCopyClick",
"enabled": "multi"
},
"remove": {
"label": "Löschen",
"tooltip": "Zeile löschen",
"click": "buttonRemoveClick",
"enabled": "multi"
},
"moveUp": {
"label": "<span class='ionicon ion-ios-arrow-round-up'></span>",
"tooltip": "Zeile nach oben",
"click": "buttonMoveUpClick",
"enabled": "multi"
},
"moveDown": {
"label": "<span class='ionicon ion-ios-arrow-round-down'></span>",
"tooltip": "Zeile nach unten",
"click": "buttonMoveDownClick",
"enabled": "multi"
}
}
}