UNPKG

profoundjs

Version:

Profound.js Framework and Server

617 lines 17.6 kB
{ "text": "", "logic": { "load records": { "steps": [ { "text": "Search criteria entered?", "answers": { "plugin": "Conditions:comparison", "variable": "mainScreen[\"searchValue\"]", "type": "truthy", "and-or": "" }, "isStructureStart": true }, { "text": "Search records", "answers": { "plugin": "Database:get-records", "connection": "#connection", "tables": "#table", "columns": "#grid_and_key_columns", "criteria": "#search_criteria", "add_order_by": false, "limit": "5000", "destination": "Grid", "grid": "grid" } }, { "isStructureEnd": true }, { "text": "Otherwise", "answers": { "plugin": "Conditions:else" }, "isStructureStart": true }, { "text": "Load all records", "answers": { "plugin": "Database:get-records", "connection": "#connection", "tables": "#table", "columns": "#grid_and_key_columns", "criteria": "", "add_order_by": false, "limit": "5000", "destination": "Grid", "grid": "grid" } }, { "isStructureEnd": true } ] }, "clear search": { "steps": [ { "text": "Clear search value", "answers": { "plugin": "Program Data:set-screen-fields", "screen": "mainScreen", "source": "Specify each value individually", "screen-values": { "searchValue": "''" } } } ] }, "add button click": { "steps": [ { "text": "Show detail screen for adding a record", "answers": { "plugin": "Navigation:show-screen", "screen": "detailScreen", "populate": true, "source": "Specify each value individually", "screen-values": { "#fieldKey": "''", "dialogTitle": "'Add Record'", "#field": "''" } } } ] }, "edit icon click": { "steps": [ { "text": "Retrieve record", "answers": { "plugin": "Database:get-record", "connection": "#connection", "tables": "#table", "columns": "#columns", "criteria": "#criteria", "destination": "Screen", "screen": "detailScreen" } }, { "text": "Show edit window", "answers": { "plugin": "Navigation:show-screen", "screen": "detailScreen", "populate": true, "source": "Specify each value individually", "screen-values": { "dialogTitle": "'Edit Record'" } } } ] }, "delete icon click": { "steps": [ { "text": "Ask to confirm", "answers": { "plugin": "Navigation:show-message-box", "title": "Delete Record", "message": "Are you sure?", "icon": "question", "button1": "Yes", "button2": "No", "button3": "", "button4": "", "button5": "", "capture_response": true, "destination": "Work variable", "work_variable": "sure" } }, { "text": "If sure", "answers": { "plugin": "Conditions:comparison", "variable": "sure", "type": "==", "value": "'Yes'", "and-or": "" }, "isStructureStart": true }, { "text": "Delete record", "answers": { "plugin": "Database:delete-records", "connection": "#connection", "table": "#table", "criteria": "#criteria" } }, { "text": "Any problems?", "answers": { "plugin": "Conditions:success", "not": true }, "isStructureStart": true }, { "text": "Show message", "answers": { "plugin": "Navigation:show-message-box", "title": "Error", "message": "Record could not be deleted.\r\n<br/>\r\n<br/>\r\n${_error.message}", "icon": "error", "button1": "", "button2": "", "button3": "", "button4": "", "button5": "", "capture_response": false } }, { "isStructureEnd": true }, { "isStructureEnd": true } ] }, "save button click": { "steps": [ { "text": "Update/insert record", "answers": { "plugin": "Database:update-insert-record", "connection": "#connection", "table": "#table", "criteria": "#criteria", "record_source": "From a screen", "screen": "detailScreen" } }, { "text": "Any problems?", "answers": { "plugin": "Conditions:success", "not": true }, "isStructureStart": true }, { "text": "Show message", "answers": { "plugin": "Navigation:show-message-box", "title": "Error", "message": "Record could not be saved.\r\n<br/>\r\n<br/>\r\n${_error.message}", "icon": "error", "button1": "", "button2": "", "button3": "", "button4": "", "button5": "", "capture_response": false } }, { "text": "Stop", "answers": { "plugin": "Navigation:terminate-routine" } }, { "isStructureEnd": true }, { "text": "Go back", "answers": { "plugin": "Navigation:show-screen", "screen": "mainScreen", "populate": false } } ] }, "cancel button click": { "steps": [ { "text": "Go back", "answers": { "plugin": "Navigation:show-screen", "screen": "mainScreen", "populate": false } } ] } }, "formats": [ { "screen": { "record format name": "mainScreen", "initial routine": { "routine": "load records", "designValue": "load records" }, "description": "List or Search Records" }, "items": [ { "id": "CenteringLayout", "field type": "layout", "left": "calc(50% - 252px)", "top": "20px", "template": "simple container", "height": "510px", "width": "505px", "center horizontally": "true", "locked in place": "true" }, { "id": "SearchBox", "field type": "textbox", "css class": "blueprint-defaults", "left": "30px", "top": "25px", "width": "345px", "height": "25px", "css class 2": "blueprint-textbox", "value": { "fieldName": "searchValue", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "string", "formatting": "Text", "textTransform": "none", "designValue": "[searchValue]" }, "layout": "CenteringLayout", "container": "1" }, { "id": "SearchButton", "field type": "graphic button", "css class": "blueprint-button", "value": "Search", "top": "25px", "width": "100px", "icon position": "left", "css class 2": "blueprint-alt-defaults", "css class 3": "no-icon", "height": "25px", "icon": "material:search", "left": "390px", "response": { "fieldName": "searchButton", "customTrue": "", "customFalse": "", "dataType": "indicator", "formatting": "Indicator", "indFormat": "1 / 0" }, "layout": "CenteringLayout", "container": "1" }, { "id": "AddButton", "field type": "graphic button", "css class": "blueprint-button", "value": "Add", "left": "30px", "top": "80px", "width": "80px", "icon position": "left", "css class 2": "blueprint-alt-defaults", "css class 3": "no-icon", "height": "25px", "onclick": { "routine": "add button click", "designValue": "add button click" }, "icon": "material:playlist_add", "layout": "CenteringLayout", "container": "1" }, { "id": "Grid", "field type": "grid", "css class": "blueprint-grid", "left": "25px", "top": "75px", "number of rows": "10", "number of columns": "2", "column widths": "94,209", "column headings": ",#heading", "header height": "35", "row height": "39", "height": "386px", "width": "304px", "css class 2": "blueprint-defaults", "visibility": "visible", "border color": "transparent", "record format name": "grid", "xlsx export": "true", "position at top": "true", "filter option": "true", "sortable columns": "true", "hide columns option": "true", "description": "Grid of Records", "subfile record number": { "fieldName": "topRecordNumber", "dataLength": "5", "decPos": "0", "curSym": "", "dataType": "zoned", "formatting": "Number", "negNum": "-999.00", "units": "" }, "subfile return rrn": { "fieldName": "topRecordNumber", "dataLength": "5", "decPos": "0", "curSym": "", "dataType": "zoned", "formatting": "Number", "negNum": "-999.00", "units": "" }, "layout": "CenteringLayout", "container": "1", "export with headings": "true" }, { "id": "ClearIcon", "field type": "icon", "icon": "material:clear", "left": "350px", "top": "25px", "z index": "22", "cursor": "pointer", "onclick": { "routine": "clear search", "designValue": "clear search" }, "height": "25px", "layout": "CenteringLayout", "container": "1" }, { "id": "EditIcon", "field type": "icon", "left": "15px", "top": "5px", "icon": "fontAwesome-solid:edit", "color": "#0099CC", "cursor": "pointer", "tool tip": "Edit record...", "onclick": { "routine": "edit icon click", "designValue": "edit icon click" }, "user defined data": { "fieldName": "#key", "refField": "#key #table", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "reference", "formatting": "Text", "textTransform": "none" }, "grid": "Grid", "column": "0" }, { "id": "DeleteIcon", "field type": "icon", "left": "50px", "top": "5px", "icon": "material:delete_forever", "color": "#FF0000", "cursor": "pointer", "tool tip": "Delete record...", "onclick": { "routine": "delete icon click", "designValue": "delete icon click" }, "user defined data": { "fieldName": "#key", "refField": "#key #table", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "reference", "formatting": "Text", "textTransform": "none" }, "grid": "Grid", "column": "0" }, { "id": "#field", "field type": "output field", "css class": "outputField", "value": { "fieldName": "#field", "refField": "#field #table", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "reference", "formatting": "Text", "textTransform": "none", "designValue": "[#field]" }, "left": "10px", "top": "10px", "css class 2": "blueprint-defaults", "css class 3": "blueprint-output-field", "grid": "Grid", "column": "1" } ] }, { "screen": { "record format name": "detailScreen", "animated screen": "new", "animation": "slide-down", "overlay screens": "true", "user defined data": { "fieldName": "#fieldKey", "refField": "#field #table", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "reference", "formatting": "Text", "textTransform": "none" }, "description": "Add / Edit Records" }, "items": [ { "id": "DetailPanel", "field type": "layout", "css class": "blueprint-defaults", "left": "10%", "top": "40px", "template": "css panel", "header text": { "fieldName": "dialogTitle", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "string", "formatting": "Text", "textTransform": "none", "designValue": "[dialogTitle]" }, "header theme": "blueprint-light-blue-header", "body theme": "blueprint-white-body", "height": "165px", "width": "80%", "css class 2": "blueprint-panel", "center horizontally": "true", "max width": "800px" }, { "id": "#field", "field type": "textbox", "css class": "blueprint-defaults", "value": { "fieldName": "#field", "refField": "#field #table", "trimLeading": "false", "trimTrailing": "true", "blankFill": "false", "rjZeroFill": "false", "dataType": "reference", "formatting": "Text", "textTransform": "none", "designValue": "[#field]" }, "left": "35%", "top": "15px", "height": "25px", "width": "60%", "css class 2": "blueprint-textbox", "layout": "DetailPanel", "container": "1" }, { "id": "#label", "field type": "output field", "css class": "label", "value": "#label", "left": "20px", "top": "20px", "css class 2": "blueprint-defaults", "css class 3": "blueprint-label", "layout": "DetailPanel", "container": "1" }, { "id": "SaveButton", "field type": "graphic button", "css class": "pui-solid-button-yes", "value": "Save", "left": "35%", "top": "70px", "width": "100px", "icon position": "left", "css class 2": "blueprint-defaults", "icon": "material:check", "height": "25px", "onclick": { "routine": "save button click", "designValue": "save button click" }, "layout": "DetailPanel", "container": "1", "shortcut key": "Enter" }, { "id": "CancelButton", "field type": "graphic button", "css class": "pui-solid-button-no", "value": "Cancel", "left": "calc(35% + 120px)", "top": "70px", "width": "100px", "icon position": "left", "css class 2": "blueprint-defaults", "icon": "material:clear", "height": "25px", "onclick": { "routine": "cancel button click", "designValue": "cancel button click" }, "layout": "DetailPanel", "container": "1", "bypass validation": "true" } ] } ], "keywords": [], "long name aliases": true }