diff --git a/Client/WebServer/css/docs.css b/Client/WebServer/css/docs.css
index b9b054498..13525904e 100644
--- a/Client/WebServer/css/docs.css
+++ b/Client/WebServer/css/docs.css
@@ -666,23 +666,34 @@ color: #31708f;
}
.docs-hidden-anchor {
- color: #b90d6c;
- background-color: #ee6db4;
- border-color: #830452;
- padding: 15px;
- border: 1px solid transparent;
- border-radius: 4px;
- margin: 20px 0;
- width: 95%;
+color: #b90d6c;
+background-color: #ee6db4;
+border-color: #830452;
+padding: 15px;
+border: 1px solid transparent;
+border-radius: 4px;
+margin: 20px 0;
+width: 95%;
+}
+
+.docs-hidden-block {
+color: #320db9;
+background-color: #6d9aee;
+border-color: #043783;
+padding: 15px;
+border: 1px solid transparent;
+border-radius: 4px;
+margin: 20px 0;
+width: 95%;
}
.docs-hidden-include {
- color: #880db9;
- background-color: #ea6dee;
- border-color: #550483;
- padding: 15px;
- border: 1px solid transparent;
- border-radius: 4px;
- margin: 20px 0;
- width: 95%;
+color: #880db9;
+background-color: #ea6dee;
+border-color: #550483;
+padding: 15px;
+border: 1px solid transparent;
+border-radius: 4px;
+margin: 20px 0;
+width: 95%;
}
\ No newline at end of file
diff --git a/Client/WebServer/index.html b/Client/WebServer/index.html
index f11f52936..9d70c869d 100644
--- a/Client/WebServer/index.html
+++ b/Client/WebServer/index.html
@@ -127,6 +127,7 @@
+
diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/arbol.json b/Projects/Superalgos/Schemas/Docs-Concepts/arbol.json
new file mode 100644
index 000000000..560e56e2f
--- /dev/null
+++ b/Projects/Superalgos/Schemas/Docs-Concepts/arbol.json
@@ -0,0 +1,66 @@
+{
+ "type": "Arbol",
+ "definition": "Write here the definition of this Concept.",
+ "paragraphs": [
+ {
+ "style": "Text",
+ "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode."
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 1"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 2"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 3"
+ },
+ {
+ "style": "Include",
+ "text": "Superalgos->Concept->Casa->Block #1"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 4"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 5"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 6"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 7"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 8"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 9"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 10"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 11"
+ },
+ {
+ "style": "Text",
+ "text": "Arbol 12"
+ },
+ {
+ "style": "Text",
+ "text": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/casa.json b/Projects/Superalgos/Schemas/Docs-Concepts/casa.json
index 731e77d8e..b60089cff 100644
--- a/Projects/Superalgos/Schemas/Docs-Concepts/casa.json
+++ b/Projects/Superalgos/Schemas/Docs-Concepts/casa.json
@@ -10,9 +10,13 @@
"style": "Text",
"text": "Casa 1"
},
+ {
+ "style": "Block",
+ "text": "Block #1"
+ },
{
"style": "Include",
- "text": "Superalgos->Concept->Vaina->Anchor 1"
+ "text": "Superalgos->Concept->Vaina->Block #1"
},
{
"style": "Text",
@@ -23,13 +27,17 @@
"text": "Casa 3"
},
{
- "style": "Text",
- "text": "Casa 4"
+ "style": "Include",
+ "text": "Superalgos->Concept->Vaina->Block #2"
},
{
"style": "Text",
"text": "Casa 5"
},
+ {
+ "style": "Text",
+ "text": "Block #1"
+ },
{
"style": "Text",
"text": "Casa 6"
@@ -41,6 +49,18 @@
{
"style": "Text",
"text": "Casa 8"
+ },
+ {
+ "style": "Text",
+ "text": "Casa 9"
+ },
+ {
+ "style": "Text",
+ "text": "Casa 10"
+ },
+ {
+ "style": "Text",
+ "text": "Casa 11"
}
]
}
\ No newline at end of file
diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json b/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json
index 8bba3c6f1..a269abda2 100644
--- a/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json
+++ b/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json
@@ -7,8 +7,8 @@
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode."
},
{
- "style": "Anchor",
- "text": "Anchor 1"
+ "style": "Block",
+ "text": "Block #1"
},
{
"style": "Text",
@@ -23,8 +23,8 @@
"text": "Vaina Paragraph 3"
},
{
- "style": "Anchor",
- "text": "Anchor 2"
+ "style": "Block",
+ "text": "Block #2"
},
{
"style": "Text",
diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
index d3c6aeafd..dbe280a3e 100644
--- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
+++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
@@ -81,6 +81,7 @@ function newSuperalgosDocSpace() {
toGif: toGif,
toPng: toPng,
toAnchor: toAnchor,
+ toBlock: toBlock,
toInclude: toInclude
}
@@ -263,6 +264,13 @@ function newSuperalgosDocSpace() {
renderDocumentPage()
}
+ function toBlock() {
+ let docSchemaParagraph = paragraphMap.get(selectedParagraph.id)
+ docSchemaParagraph.style = 'Block'
+ contextMenuForceOutClick()
+ renderDocumentPage()
+ }
+
function toInclude() {
let docSchemaParagraph = paragraphMap.get(selectedParagraph.id)
docSchemaParagraph.style = 'Include'
@@ -603,6 +611,9 @@ function newSuperalgosDocSpace() {
if (paragraphNode.id.indexOf('-anchor') >= 0) {
selectedParagraphData = paragraphNode.innerText
}
+ if (paragraphNode.id.indexOf('-block') >= 0) {
+ selectedParagraphData = paragraphNode.innerText
+ }
if (paragraphNode.id.indexOf('-include') >= 0) {
selectedParagraphData = paragraphNode.innerText
}
@@ -1371,6 +1382,10 @@ function newSuperalgosDocSpace() {
documentPoints = documentPoints + thisPhraseCount * 0
break
}
+ case 'block': {
+ documentPoints = documentPoints + thisPhraseCount * 0
+ break
+ }
case 'include': {
documentPoints = documentPoints + thisPhraseCount * 0
break
@@ -1801,6 +1816,7 @@ function newSuperalgosDocSpace() {
style: "Error",
text: error
}
+ key = 'error-paragraph-' + paragraphIndex
renderParagraph(paragraph, key)
paragraphIndex++
}
@@ -1820,12 +1836,12 @@ function newSuperalgosDocSpace() {
let project = splittedIncludeText[0]
let category = splittedIncludeText[1]
let type = splittedIncludeText[2]
- let anchor
+ let block
let definition = false
if (splittedIncludeText[3] === 'Definition') {
definition = true
} else {
- anchor = splittedIncludeText[3]
+ block = splittedIncludeText[3]
}
let includedSchemaDocument
@@ -1857,19 +1873,19 @@ function newSuperalgosDocSpace() {
if (definition === true) {
} else {
- let anchorFound = false
+ let blockFound = false
for (let i = 0; i < includedSchemaDocument.paragraphs.length; i++) {
let key = 'included-paragraph-' + paragraphIndex
let paragraph = includedSchemaDocument.paragraphs[i]
- if (anchorFound === false) {
- if (paragraph.style === "Anchor" && paragraph.text === anchor) {
- anchorFound = true
+ if (blockFound === false) {
+ if (paragraph.style === "Block" && paragraph.text === block) {
+ blockFound = true
}
} else {
- if (paragraph.style === "Anchor") {
- return
+ if (paragraph.style === "Block") {
+ return // Expected return without errors
}
if (paragraph.style === "Include") {
renderParagraph(paragraph, key)
@@ -1880,6 +1896,7 @@ function newSuperalgosDocSpace() {
style: "Error",
text: error
}
+ key = 'error-paragraph-' + paragraphIndex
renderParagraph(paragraph, key)
paragraphIndex++
}
@@ -1889,6 +1906,9 @@ function newSuperalgosDocSpace() {
}
}
}
+ if (blockFound === false) {
+ return 'Block ' + block + ' not found.'
+ }
}
}
}
@@ -2728,6 +2748,14 @@ function newSuperalgosDocSpace() {
innerHTML = paragraph.text
break
}
+ case 'Block': {
+ styleClass = 'class="docs-hidden-block"'
+ prefix = ''
+ role = ''
+ key = key + '-block'
+ innerHTML = paragraph.text
+ break
+ }
case 'Include': {
styleClass = 'class="docs-hidden-include"'
prefix = ''