From 6114cc1da2714196f72ef79fd91fb527e7583ee1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 29 Dec 2020 17:59:21 +0100 Subject: [PATCH] More topics --- .../Schemas/Docs-Concepts/vaina.json | 2 +- .../docs-basics-009-docs-page.json | 15 +++++ .../docs-basics-010-docs-paragraph.json | 14 +++++ .../docs-basics-011-docs-page-block.json | 15 +++++ .../docs-basics-012-docs-nodes.json | 15 +++++ .../docs-basics-013-docs-concepts.json | 15 +++++ .../docs-basics-014-docs-topics.json | 15 +++++ ...docs-basics-015-docs-paragraph-styles.json | 15 +++++ ...ragraph-styles-020-docs-section-style.json | 15 +++++ ...aragraph-styles-021-docs-anchor-style.json | 24 ++++++++ ...paragraph-styles-022-docs-block-style.json | 26 +++++++++ ...ragraph-styles-023-docs-include-style.json | 58 +++++++++++++++++++ .../UI/Spaces/Docs-Space/DocsSpace.js | 4 +- 13 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-009-docs-page.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-010-docs-paragraph.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-011-docs-page-block.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-012-docs-nodes.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-013-docs-concepts.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-014-docs-topics.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-020-docs-section-style.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-021-docs-anchor-style.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-022-docs-block-style.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-023-docs-include-style.json diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json b/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json index fb19f2ef6..28e8fa6c2 100644 --- a/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json +++ b/Projects/Superalgos/Schemas/Docs-Concepts/vaina.json @@ -77,7 +77,7 @@ "text": "Vaina Paragraph 4" }, { - "style": "Anchor", + "style": "Include", "text": "Anchor 1" }, { diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-009-docs-page.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-009-docs-page.json new file mode 100644 index 000000000..d06e7ed7d --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-009-docs-page.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "9", + "type": "Docs Page", + "definition": { + "text": "The Docs is a collection of pages classified in 3 different categories: Docs Nodes, Docs Concepts and Docs Topics. A page contains information valuable for the users of the system.", + "updated": 1609260440891 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-010-docs-paragraph.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-010-docs-paragraph.json new file mode 100644 index 000000000..5a6d74949 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-010-docs-paragraph.json @@ -0,0 +1,14 @@ +{ + "topic": "Docs Basics", + "pageNumber": "10", + "type": "Docs Paragraph", + "definition": { + "text": "Write here a summary for this topic page." + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-011-docs-page-block.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-011-docs-page-block.json new file mode 100644 index 000000000..d6a9c890c --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-011-docs-page-block.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "11", + "type": "Docs Page Block", + "definition": { + "text": "A Page Block is a set of paragraphs within a specific Docs Page. A single Docs Page may have 0 to any number of paragraphs.", + "updated": 1609260648075 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-012-docs-nodes.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-012-docs-nodes.json new file mode 100644 index 000000000..435825acd --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-012-docs-nodes.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "12", + "type": "Docs Nodes", + "definition": { + "text": "Docs Nodes is the set of all pages in the Docs under the Docs Page Category of Node.", + "updated": 1609260759079 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-013-docs-concepts.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-013-docs-concepts.json new file mode 100644 index 000000000..545217594 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-013-docs-concepts.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "13", + "type": "Docs Concepts", + "definition": { + "text": "Docs Concepts is the set of all pages in the Docs under the Docs Page Category of Concept.", + "updated": 1609260746120 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-014-docs-topics.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-014-docs-topics.json new file mode 100644 index 000000000..6223af7cb --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-014-docs-topics.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "14", + "type": "Docs Topics", + "definition": { + "text": "Docs Topics is the set of all pages in the Docs under the Docs Page Category of Topic.", + "updated": 1609260810214 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json new file mode 100644 index 000000000..9e41030ed --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "15", + "type": "Docs Paragraph Styles", + "definition": { + "text": "Each paragraph at a Docs Page, need to be assigend a style. The most commonly used style is the Docs Text Style.", + "updated": 1609260947769 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-020-docs-section-style.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-020-docs-section-style.json new file mode 100644 index 000000000..e95cb5265 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-020-docs-section-style.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Paragraph Styles", + "pageNumber": "20", + "type": "Docs Section Style", + "definition": { + "text": "Use this style to divide big areas of a page into different sections.", + "updated": 1609258595418 + }, + "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." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-021-docs-anchor-style.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-021-docs-anchor-style.json new file mode 100644 index 000000000..d9d04de14 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-021-docs-anchor-style.json @@ -0,0 +1,24 @@ +{ + "topic": "Docs Paragraph Styles", + "pageNumber": "21", + "type": "Docs Anchor Style", + "definition": { + "text": "Amchor paragraphs are used together with the Docs Goto Command. When you want to generate a Docs Link to an specific part of a Docs Page, you first need to create an Anchor paragraph in order to be able to create the link to that part of the page.", + "updated": 1609258745310 + }, + "paragraphs": [ + { + "style": "Text", + "text": "To correctly ddefine an Anchor Paragraph, you need to follow the following syntax:", + "updated": 1609259277591 + }, + { + "style": "Javascript", + "text": "Anchor Name" + }, + { + "style": "List", + "text": "Anchor Name: This refers to any name that you would like to give to the newly created Anchor. The name must be unique within the page." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-022-docs-block-style.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-022-docs-block-style.json new file mode 100644 index 000000000..33b1e5eba --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-022-docs-block-style.json @@ -0,0 +1,26 @@ +{ + "topic": "Docs Paragraph Styles", + "pageNumber": "22", + "type": "Docs Block Style", + "definition": { + "text": "Block paragraphs defines set of paragraphs that can be inclided from other pages. When you include a block by creating a Docs Include Style paragraph, you need to reference a Block paragraph created at the page that have the set of paragraphs to be inclided. A Block contains all the paragraph after itself until the next Block or the end of the page.", + "updated": 1609259016289 + }, + "paragraphs": [ + { + "style": "Text", + "text": "To correctly ddefine an Block Paragraph, you need to follow the following syntax:", + "updated": 1609259397904 + }, + { + "style": "Javascript", + "text": "Block Name", + "updated": 1609259337116 + }, + { + "style": "List", + "text": "Block Name: This refers to any name that you would like to give to the newly created Block. The name must be unique within the page.", + "updated": 1609259387171 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-023-docs-include-style.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-023-docs-include-style.json new file mode 100644 index 000000000..f34b2aa6a --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-023-docs-include-style.json @@ -0,0 +1,58 @@ +{ + "topic": "Docs Paragraph Styles", + "pageNumber": "23", + "type": "Docs Include Style", + "definition": { + "text": "Include paragraphs are used to include into a Docs Page paragraphs that belong to other Docs Pages. In order to do that, you need to reference a Docs Block Style paragraph located in some other Docs Page.", + "updated": 1609259112766 + }, + "paragraphs": [ + { + "style": "Title", + "text": "Syntax", + "updated": 1609259560967 + }, + { + "style": "Javascript", + "text": "Project->Docs Page Category->Docs Page Name->Docs Page Block", + "updated": 1609259624906 + }, + { + "style": "Title", + "text": "Parameters" + }, + { + "style": "List", + "text": "Project : Is the project where the Docs Page belongs to.", + "updated": 1609259672503 + }, + { + "style": "List", + "text": "Docs Page Category : Node, Concept or Topic." + }, + { + "style": "List", + "text": "Docs Page Name: For Nodes it is the type of node, for Concepts, the concept name, for topics, the topic's page name.", + "updated": 1609259701956 + }, + { + "style": "List", + "text": "Docs Page Block: This is the Block name of the block of paragraphs you want to include. You need to have a paragraphs with a Docs Block Style on the target page, with the name you are specifying here.", + "updated": 1609259783532 + }, + { + "style": "Title", + "text": "Examples" + }, + { + "style": "Javascript", + "text": "docs.goto Superalgos->Node->Task->Block Intro", + "updated": 1609259810378 + }, + { + "style": "Javascript", + "text": "docs.goto Superalgos->Topic->Docs Text Style->Block1", + "updated": 1609259792093 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index c29ea93d7..8a8febe82 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -635,7 +635,7 @@ function newSuperalgosDocSpace() { if (paragraphNode === undefined) { return false } } } - if (paragraphNode.id === undefined || paragraphNode.id.indexOf('editable-paragraph') < 0) { + if (paragraphNode === undefined || paragraphNode === null || paragraphNode.id === undefined || paragraphNode.id.indexOf('editable-paragraph') < 0) { return false } /* @@ -2097,7 +2097,7 @@ function newSuperalgosDocSpace() { let includedSchemaDocument if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - return 'Project ' + project + ' not found.' + return 'Include Paragraph Style Syntax Error. The Project ' + project + ' could not be found. Check the Docs Include Style Syntax to learn how to include paragraphs from a different page. This error message will dissapear as soon as you fix the problem.' } switch (category) { case 'Node': {