From b0f62d5dbc17fad62e1b4f057bc2b1315f17f1d4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 23 Dec 2020 12:05:41 +0100 Subject: [PATCH] includes --- Client/WebServer/css/docs.css | 11 ++++++++ Client/WebServer/index.html | 3 ++- .../UI/Spaces/Docs-Space/DocsSpace.js | 27 +++++++++++++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Client/WebServer/css/docs.css b/Client/WebServer/css/docs.css index ea0da8991..4d2d7e8ce 100644 --- a/Client/WebServer/css/docs.css +++ b/Client/WebServer/css/docs.css @@ -663,4 +663,15 @@ color: #31708f; 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%; } \ No newline at end of file diff --git a/Client/WebServer/index.html b/Client/WebServer/index.html index f34b95499..f83557e8f 100644 --- a/Client/WebServer/index.html +++ b/Client/WebServer/index.html @@ -125,7 +125,8 @@ - + + diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index b668ed846..4237d934f 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -79,7 +79,8 @@ function newSuperalgosDocSpace() { toTable: toTable, toGif: toGif, toPng: toPng, - toAnchor: toAnchor + toAnchor: toAnchor, + toInclude: toInclude } function editParagraph() { @@ -250,6 +251,13 @@ function newSuperalgosDocSpace() { contextMenuForceOutClick() renderDocumentPage() } + + function toInclude() { + let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) + docSchemaParagraph.style = 'Include' + contextMenuForceOutClick() + renderDocumentPage() + } } function setUpMenuItemsMap() { @@ -581,6 +589,9 @@ function newSuperalgosDocSpace() { if (paragraphNode.id.indexOf('-anchor') >= 0) { selectedParagraphData = paragraphNode.innerText } + if (paragraphNode.id.indexOf('-include') >= 0) { + selectedParagraphData = paragraphNode.innerText + } selectedParagraph = paragraphNode selectedParagraphHeight = paragraphNode.getClientRects()[0].height @@ -1339,7 +1350,11 @@ function newSuperalgosDocSpace() { break } case 'anchor': { - documentPoints = documentPoints + thisPhraseCount * 1 + documentPoints = documentPoints + thisPhraseCount * 0 + break + } + case 'include': { + documentPoints = documentPoints + thisPhraseCount * 0 break } } @@ -2595,6 +2610,14 @@ function newSuperalgosDocSpace() { innerHTML = paragraph.text break } + case 'Include': { + styleClass = 'class="docs-hidden-include"' + prefix = '' + role = '' + key = key + '-include' + innerHTML = paragraph.text + break + } } HTML = HTML + '

' + prefix + ' ' + innerHTML + sufix + '

'