From 28bf130e70e5e109a453e65754ce60eceb695bd1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 21 Dec 2020 10:21:18 +0100 Subject: [PATCH] Summary on Topics --- .../Schemas/Docs-Topics/contributing-001.json | 15 +++++++ .../Schemas/Docs-Topics/contributing-002.json | 15 +++++++ .../Schemas/Docs-Topics/contributing.json | 8 ---- .../UI/Spaces/Docs-Space/DocsSpace.js | 44 +++++++++++-------- 4 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/contributing-001.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/contributing-002.json delete mode 100644 Projects/Superalgos/Schemas/Docs-Topics/contributing.json diff --git a/Projects/Superalgos/Schemas/Docs-Topics/contributing-001.json b/Projects/Superalgos/Schemas/Docs-Topics/contributing-001.json new file mode 100644 index 000000000..d3e69aa1c --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/contributing-001.json @@ -0,0 +1,15 @@ + + { + "type": "Contributing - Page 1 Title", + "definition": "There are many ways to contribute", + "pageNumber": 1, + "paragraphs": [ + { + "style": "Title", + "text": "This is the title of the first page" + } + ] + } + + + diff --git a/Projects/Superalgos/Schemas/Docs-Topics/contributing-002.json b/Projects/Superalgos/Schemas/Docs-Topics/contributing-002.json new file mode 100644 index 000000000..bc9c287cf --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/contributing-002.json @@ -0,0 +1,15 @@ + + { + "type": "Contributing - Page 2 Title", + "definition": "These are other ways to contribute. These are other ways to contribute. These are other ways to contribute. These are other ways to contribute. These are other ways to contribute. These are other ways to contribute. ", + "pageNumber": 1, + "paragraphs": [ + { + "style": "Title", + "text": "bla bla bla bla blaaaaa" + } + ] + } + + + diff --git a/Projects/Superalgos/Schemas/Docs-Topics/contributing.json b/Projects/Superalgos/Schemas/Docs-Topics/contributing.json deleted file mode 100644 index 0cdd8b6c3..000000000 --- a/Projects/Superalgos/Schemas/Docs-Topics/contributing.json +++ /dev/null @@ -1,8 +0,0 @@ - - { - "type": "Contributing", - "definition": "There are many ways to contribute" - } - - - diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index 4e71d3e8d..3b3ede6e2 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -680,7 +680,7 @@ function newSuperalgosDocSpace() { documentIndex = { phraseCount: {}, // here we have an object with properties matching it paragraph style, and each property is a map of phrases and their total count. schemaDocument: SCHEMAS_BY_PROJECT.get(project).array.docsTopicSchema[i], - documentCategory: 'Topics', + documentCategory: 'Topic', project: project } indexDocument(documentIndex) @@ -953,11 +953,11 @@ function newSuperalgosDocSpace() { nodeName = '' } if (nodeName === '') { - linkLabel = nodeType - }else { - linkLabel = nodeType + ' ('+ nodeName + ')' - } - path = path + link + linkLabel + '' + linkLabel = nodeType + } else { + linkLabel = nodeType + ' (' + nodeName + ')' + } + path = path + link + linkLabel + '' } } @@ -1163,18 +1163,24 @@ function newSuperalgosDocSpace() { /* Title */ HTML = HTML + '

' + objectBeingRendered.type + '

' - /* We start with the Definition Table */ + /* We start with the Definition Table / Summary */ if (schemaDocument.definition !== undefined) { - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '
' + addToolTips(schemaDocument.definition) + '
' - HTML = HTML + '
' + if (objectBeingRendered.category === 'Topic') { + HTML = HTML + '
Summary: ' + addToolTips(schemaDocument.definition) + '
' + } else { + HTML = HTML + '' + HTML = HTML + '' + if (objectBeingRendered.category === 'Node') { + HTML = HTML + '' + } + HTML = HTML + '' + HTML = HTML + '' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + addToolTips(schemaDocument.definition) + '
' + HTML = HTML + '
' + } } HTML = HTML + '
' @@ -1212,7 +1218,9 @@ function newSuperalgosDocSpace() { function addImages() { addProjectImage() if (schemaDocument.definition !== undefined) { - addDefinitionImage(objectBeingRendered.project) + if (objectBeingRendered.category === 'Node') { + addDefinitionImage(objectBeingRendered.project) + } } if (objectBeingRendered.category === 'Node') {