Files
Stream_PHX_A7/Gateways/FE/projects/.resources/317d6b1a7f693b4c0d3824b98a884222ad4b218fa7e49dd25cf91546d0badcf9

433 lines
12 KiB
Plaintext

{
"custom": {},
"params": {
"tagPath": ""
},
"propConfig": {
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 575,
"width": 375
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "ApplicationHelp/Field"
},
"text": "Page"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Value"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Page"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"style": {
"marginBottom": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "ApplicationHelp/Field"
},
"text": "Title"
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "Value"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "!{parent.custom.edit}"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "/root.custom.data.title"
},
"type": "property"
}
}
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.parent.custom.edit \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Edit"
},
"position": {
"basis": "32px",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "!{parent.custom.edit}"
},
"type": "expr"
}
}
},
"props": {
"path": "material/edit",
"style": {
"cursor": "pointer",
"marginLeft": "6px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Editor"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{parent.custom.edit}"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "/root.custom.data.title"
},
"type": "property"
}
}
},
"props": {
"style": {
"borderRadius": "4px"
}
},
"type": "ia.input.text-field"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\ttitle \u003d self.getSibling(\"Editor\").props.text\n\t\n\tif title \u003d\u003d None or len(title) \u003d\u003d 0:\n\t\tFramework.Popup.showError(\"Please enter in a title\")\n\telse:\n\t\tself.view.getChild(\"root\").custom.data.title \u003d title\n\t\tself.parent.custom.edit \u003d False"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Save"
},
"position": {
"basis": "32px",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{parent.custom.edit}"
},
"type": "expr"
}
}
},
"props": {
"path": "material/save",
"style": {
"cursor": "pointer",
"marginLeft": "6px"
}
},
"type": "ia.display.icon"
}
],
"custom": {
"edit": false
},
"meta": {
"name": "Value"
},
"position": {
"basis": "32px",
"shrink": 0
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Title"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"style": {
"marginBottom": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "ApplicationHelp/Field"
},
"text": "Body"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Editor"
},
"position": {
"grow": 1
},
"propConfig": {
"props.params.inText": {
"binding": {
"config": {
"path": "/root.custom.data.body"
},
"type": "property"
}
}
},
"props": {
"params": {
"outText": ""
},
"path": "Library/Templates/Markdown/Editor",
"style": {
"marginBottom": "10px"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Editor"
},
"position": {
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\ttagPath \u003d self.view.params.tagPath\n\tid \u003d self.view.getChild(\"root\").custom.data.id\n\ttitle \u003d self.view.getChild(\"root\").custom.data.title\n\tbody \u003d self.parent.parent.getChild(\"Editor\").getChild(\"Editor\").props.params.outText\n\tuser \u003d \"guest\" if self.session.props.auth.user.userName \u003d\u003d None else self.session.props.auth.user.userName\n\t\n\tif title \u003d\u003d None or len(title) \u003d\u003d 0:\n\t\tFramework.Popup.showError(\"Please enter in a title\")\n\telse:\n\t\tif id \u003d\u003d None:\n\t\t\tsystem.db.runNamedQuery(\"Tag Notes/Insert Note\", {\"tagPath\":tagPath, \"title\":title, \"body\":body, \"user\":user})\n\t\telse:\n\t\t\tsystem.db.runNamedQuery(\"Tag Notes/Update Note\", {\"id\":id, \"title\":title, \"body\":body, \"user\":user})\n\t\t\t\n\t\tsystem.perspective.sendMessage(messageType\u003d\"tag-notes-refresh\", payload\u003d{})\n\t\tsystem.perspective.closePopup(id\u003d\"tag-notes-editor\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Save"
},
"position": {
"basis": "100px",
"shrink": 0
},
"props": {
"image": {
"icon": {
"path": "material/save"
}
},
"style": {
"classes": "ApplicationHelp/Standard_Button",
"marginBottom": "6px",
"marginRight": "6px"
},
"text": "Save"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"draggable": true,
"id": "tag-notes-editor",
"modal": false,
"overlayDismiss": false,
"resizable": true,
"showCloseIcon": true,
"type": "close",
"viewPath": "",
"viewportBound": false
},
"scope": "C",
"type": "popup"
}
}
},
"meta": {
"name": "Close"
},
"position": {
"basis": "100px",
"shrink": 0
},
"props": {
"image": {
"icon": {
"path": "material/exit_to_app"
}
},
"style": {
"classes": "ApplicationHelp/Standard_Button",
"marginBottom": "6px"
},
"text": "Close"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Actions"
},
"position": {
"basis": "38px",
"shrink": 0
},
"props": {
"justify": "center",
"wrap": "wrap"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"custom.data": {
"binding": {
"config": {
"parameters": {
"tagPath": "{view.params.tagPath}"
},
"queryPath": "Tag Notes/Get Notes",
"returnFormat": "json"
},
"transforms": [
{
"code": "\tif value \u003d\u003d None or len(value) \u003d\u003d 0:\n\t\tvalue \u003d {\"id\":None, \"title\":\"\", \"body\":\"\", \"last_updated\":None, \"last_updated_by\":None}\n\telse:\n\t\tvalue \u003d value[0]\n\t\n\treturn value",
"type": "script"
}
],
"type": "query"
}
}
},
"props": {
"direction": "column",
"style": {
"padding": "10px"
}
},
"type": "ia.container.flex"
}
}