Status Dependency with Code
This commit is contained in:
1 parent
d20be80b07
commit
7f0c9f751e
3 files changed
+45
-10
No files matched your search
@@ -1443,11 +1443,15 @@ function newProtocolNode () {
|
||||
let object = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
if (parseCode) {
|
||||
object.code = JSON.parse(node.code)
|
||||
}
|
||||
if (includePayload) {
|
||||
object.savedPayload = getSavedPayload(node, includeReferences)
|
||||
}
|
||||
@@ -1479,17 +1483,23 @@ function newProtocolNode () {
|
||||
subType: node.subType,
|
||||
name: node.name,
|
||||
code: node.code,
|
||||
record: getProtocolNode(node.record, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren),
|
||||
datasets: []
|
||||
}
|
||||
if (node.datasets !== undefined) {
|
||||
for (let m = 0; m < node.datasets.length; m++) {
|
||||
let dataset = getProtocolNode(node.datasets[m], removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren)
|
||||
if (dataset !== undefined) {
|
||||
object.datasets.push(dataset)
|
||||
if (followAncestors) {
|
||||
object.parentNode = getProtocolNode(node.payload.parentNode, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren)
|
||||
}
|
||||
if (excludeChildren !== true) {
|
||||
if (node.datasets !== undefined) {
|
||||
for (let m = 0; m < node.datasets.length; m++) {
|
||||
let dataset = getProtocolNode(node.datasets[m], removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren)
|
||||
if (dataset !== undefined) {
|
||||
object.datasets.push(dataset)
|
||||
}
|
||||
}
|
||||
}
|
||||
object.record = getProtocolNode(node.record, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren)
|
||||
}
|
||||
|
||||
if (parseCode) {
|
||||
object.code = JSON.parse(node.code)
|
||||
}
|
||||
@@ -1553,6 +1563,11 @@ function newProtocolNode () {
|
||||
if (parseCode) {
|
||||
object.code = JSON.parse(node.code)
|
||||
}
|
||||
if (includeParent) {
|
||||
followAncestors = true
|
||||
excludeChildren = true
|
||||
object.parentNode = getProtocolNode(node.payload.parentNode, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
|
||||
@@ -1246,7 +1246,8 @@ function newUiObjectsFromNodes () {
|
||||
function addStatusDependency (node) {
|
||||
let object = {
|
||||
type: 'Status Dependency',
|
||||
name: 'New Status Dependency'
|
||||
name: 'New Status Dependency',
|
||||
code: '{"mainUtility": "Self Reference|Market Starting Point|Market Ending Point"}'
|
||||
}
|
||||
if (node.statusDependencies === undefined) {
|
||||
node.statusDependencies = []
|
||||
|
||||
@@ -1170,7 +1170,26 @@ function newUiObjectConstructor () {
|
||||
break
|
||||
}
|
||||
case 'Status Dependency': {
|
||||
uiObject.codeEditor = newCodeEditor()
|
||||
uiObject.codeEditor.isVisibleFunction = uiObject.isVisibleFunction
|
||||
uiObject.codeEditor.initialize()
|
||||
uiObject.codeEditor.container.connectToParent(uiObject.container, false, false, true, true, false, false, false, false)
|
||||
addLeftIcons(menuItemsInitialValues, floatingObject)
|
||||
menuItemsInitialValues.push(
|
||||
{
|
||||
action: 'Edit Status Dependency',
|
||||
actionFunction: uiObject.codeEditor.activate,
|
||||
label: 'Edit Status Dependency',
|
||||
visible: true,
|
||||
iconPathOn: 'html',
|
||||
iconPathOff: 'html',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -40,
|
||||
dontShowAtFullscreen: true
|
||||
}
|
||||
)
|
||||
menuItemsInitialValues.push(
|
||||
{
|
||||
action: 'Delete Status Dependency',
|
||||
@@ -1184,7 +1203,7 @@ function newUiObjectConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -20
|
||||
angle: 0
|
||||
}
|
||||
)
|
||||
menuItemsInitialValues.push(
|
||||
@@ -1198,7 +1217,7 @@ function newUiObjectConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 20
|
||||
angle: 40
|
||||
}
|
||||
)
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user