Project Icon

This commit is contained in:
Luis Fernando Molina committed 2020-12-11 08:41:54 +01:00
1 parent 33f4e4afd7
commit 29cd74efd7
2 files changed
+31 -3

No files matched your search

@@ -423,7 +423,7 @@ function newSuperalgosDocSpace() {
HTML = HTML + '<div id="context-menu-clickable-div" class="docs-node-html-page-container">' // Container Starts
/* Title */
HTML = HTML + '<div><h2 class="docs-h2" id="' + renderingNode.type.toLowerCase().replace(' ', '-') + '" > ' + renderingNode.project + ' / ' + renderingNode.type + '</h2></div>'
HTML = HTML + '<div><table class="docs-titleTable"><tr><td width="50px"><div id="projectImageDiv" class="docs-image-container"/></td><td><h2 class="docs-h2" id="' + renderingNode.type.toLowerCase().replace(' ', '-') + '" > ' + renderingNode.project + ' / ' + renderingNode.type + '</h2></td></tr></table></div>'
/* We start with the Definition Table */
if (nodeDocsDefinition.definition !== undefined) {
@@ -531,6 +531,8 @@ function newSuperalgosDocSpace() {
let docsAppDiv = document.getElementById('docsDiv')
docsAppDiv.innerHTML = HTML + addFooter()
addProjectImage(project)
if (nodeDocsDefinition.definition !== undefined) {
addDefinitionImage(nodeAppDefinition, renderingNode.project)
}
@@ -566,7 +568,7 @@ function newSuperalgosDocSpace() {
function addDefinitionImage(nodeAppDefinition, project) {
if (nodeAppDefinition.icon === undefined) {
imageName = nodeAppDefinition.type.toLowerCase().replace(' ', '-')
imageName = nodeAppDefinition.type.toLowerCase().replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-')
}
let htmlImage = document.createElement("IMG")
let webParam = 'Icons/' + project + '/' + imageName + '.png'
@@ -579,6 +581,20 @@ function newSuperalgosDocSpace() {
definitionImageDiv.appendChild(htmlImage)
}
function addProjectImage(project) {
imageName = project.toLowerCase().replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-')
let htmlImage = document.createElement("IMG")
let webParam = 'Icons/' + project + '/' + imageName + '.png'
htmlImage.src = webParam
htmlImage.width = "50"
htmlImage.height = "50"
let projectImageDiv = document.getElementById('projectImageDiv')
projectImageDiv.appendChild(htmlImage)
}
function addToolTips(node, text) {
const TOOL_TIP_HTML = '<div class="docs-tooltip">NODE_TYPE<span class="docs-tooltiptext">NODE_DEFINITION</span></div>'