Docs Bug Fixed handling Menu Items of other Projects
This commit is contained in:
1 parent
bf931fedf6
commit
ee90ba2b45
6 files changed
+24
-6
No files matched your search
@@ -14,6 +14,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Process Definition",
|
||||
"relatedUiObject": "Process Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
@@ -21,6 +22,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Product Definition",
|
||||
"relatedUiObject": "Product Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Plotter",
|
||||
"relatedUiObject": "Plotter",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Data Mien",
|
||||
"relatedUiObject": "Data Mien",
|
||||
"label": "Add Data Mine",
|
||||
"relatedUiObject": "Data Mine",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Process Definition",
|
||||
"relatedUiObject": "Process Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
@@ -21,6 +22,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Product Definition",
|
||||
"relatedUiObject": "Product Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Process Definition",
|
||||
"relatedUiObject": "Process Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
@@ -21,6 +22,7 @@
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Product Definition",
|
||||
"relatedUiObject": "Product Definition",
|
||||
"relatedUiObjectProject": "Foundations",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"actionProject": "Foundations"
|
||||
},
|
||||
|
||||
@@ -854,7 +854,7 @@ function newFoundationsDocsDocumentPage() {
|
||||
if (appSchemaDocument === undefined || appSchemaDocument.menuItems === undefined) { return }
|
||||
for (let i = 0; i < appSchemaDocument.menuItems.length; i++) {
|
||||
let menuItem = appSchemaDocument.menuItems[i]
|
||||
let collectionImage = getIcon()
|
||||
let collectionImage = getIcon(appSchemaDocument.menuItems[i].relatedUiObjectProject, appSchemaDocument.menuItems[i].actionProject)
|
||||
if (collectionImage === undefined) {
|
||||
continue
|
||||
}
|
||||
@@ -866,12 +866,23 @@ function newFoundationsDocsDocumentPage() {
|
||||
let dummyImage = parentElement.childNodes[0]
|
||||
parentElement.replaceChild(imageElement, dummyImage)
|
||||
|
||||
function getIcon() {
|
||||
function getIcon(relatedUiObjectProject, actionProject) {
|
||||
let project
|
||||
if (menuItem.relatedUiObject !== undefined) {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.relatedUiObject)
|
||||
if (relatedUiObjectProject !== undefined) {
|
||||
project = relatedUiObjectProject
|
||||
} else {
|
||||
project = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project
|
||||
}
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(project, menuItem.relatedUiObject)
|
||||
} else {
|
||||
if (actionProject !== undefined) {
|
||||
project = actionProject
|
||||
} else {
|
||||
project = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project
|
||||
}
|
||||
if (menuItem.iconPathOn !== undefined) {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.iconPathOn)
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(project, menuItem.iconPathOn)
|
||||
} else {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'bitcoin')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user