From 7c489f0d725148d428d167ac5e63731b0b97b3e3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 28 Dec 2020 20:09:03 +0100 Subject: [PATCH] docs command errors finished --- .../docs-basics-004-docs-topic-name.json | 16 +++++ .../docs-basics-005-docs-page-number.json | 15 +++++ .../docs-basics-006-docs-node-page.json | 15 +++++ .../docs-basics-007-docs-concept-page.json | 14 +++++ .../docs-basics-008-docs-topic-page.json | 14 +++++ ...-commands-errors-001-docs-error-intro.json | 4 +- ...ors-002-docs-error-too-few-parameters.json | 12 +++- ...003-docs-error-project-does-not-exist.json | 11 +++- ...ors-004-docs-error-category-not-valid.json | 12 +++- ...errors-007-docs-error-only-in-english.json | 38 ++++++++++++ ...s-errors-008-docs-error-missing-colon.json | 39 +++++++++++++ ...ands-errors-009-docs-error-missing-to.json | 34 +++++++++++ ...ds-errors-010-docs-error-missing-from.json | 33 +++++++++++ ...rors-011-docs-error-changes-not-saved.json | 34 +++++++++++ ...rs-012-docs-error-page-already-exists.json | 32 ++++++++++ ...rs-013-docs-error-page-does-not-exist.json | 33 +++++++++++ ...s-014-docs-error-page-number-mismatch.json | 33 +++++++++++ ...errors-015-docs-error-toopic-mismatch.json | 33 +++++++++++ .../UI/Spaces/Docs-Space/DocsSpace.js | 58 +++++++++---------- 19 files changed, 446 insertions(+), 34 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-004-docs-topic-name.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-005-docs-page-number.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-006-docs-node-page.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-007-docs-concept-page.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-008-docs-topic-page.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-007-docs-error-only-in-english.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-008-docs-error-missing-colon.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-009-docs-error-missing-to.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-010-docs-error-missing-from.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-011-docs-error-changes-not-saved.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-012-docs-error-page-already-exists.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-013-docs-error-page-does-not-exist.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-014-docs-error-page-number-mismatch.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-015-docs-error-toopic-mismatch.json diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-004-docs-topic-name.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-004-docs-topic-name.json new file mode 100644 index 000000000..e6327cb47 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-004-docs-topic-name.json @@ -0,0 +1,16 @@ +{ + "topic": "Docs Basics", + "pageNumber": "4", + "type": "Docs Topic Name", + "definition": { + "text": "Refers to the name of the topic, which in turn is a collection of related pages at the Docs.", + "updated": 1609182060836 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Topic names are used to group a set of related pages under a certain topic. ", + "updated": 1609182145551 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-005-docs-page-number.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-005-docs-page-number.json new file mode 100644 index 000000000..2fbbd6514 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-005-docs-page-number.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "5", + "type": "Docs Page Number", + "definition": { + "text": "Each topic page must have an assigned page number. The page number is used to build the topic index displayed at the top of each Docs Topic Page.", + "updated": 1609182198659 + }, + "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-006-docs-node-page.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-006-docs-node-page.json new file mode 100644 index 000000000..4391a0f1e --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-006-docs-node-page.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "6", + "type": "Docs Node Page", + "definition": { + "text": "Each node of each Project have a corresponding Node Page at the Docs, explaining everything to be known about that node.", + "updated": 1609182353739 + }, + "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-007-docs-concept-page.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-007-docs-concept-page.json new file mode 100644 index 000000000..9aa41878a --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-007-docs-concept-page.json @@ -0,0 +1,14 @@ +{ + "topic": "Docs Basics", + "pageNumber": "7", + "type": "Docs Concept Page", + "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-008-docs-topic-page.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-008-docs-topic-page.json new file mode 100644 index 000000000..dc12c1156 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-008-docs-topic-page.json @@ -0,0 +1,14 @@ +{ + "topic": "Docs Basics", + "pageNumber": "8", + "type": "Docs Topic Page", + "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-commands-errors-001-docs-error-intro.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-001-docs-error-intro.json index 282531bd9..85daf66b3 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-001-docs-error-intro.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-001-docs-error-intro.json @@ -9,8 +9,8 @@ "paragraphs": [ { "style": "Text", - "text": "The following is the complete list of errors you might find while executing Docs commands. In fact, once you get an error, you will be automatically sent to this page at the place the error is explained.", - "updated": 1609159398051 + "text": "The previous is the complete list of errors you might find while executing Docs commands. In fact, once you get an error, you will be automatically sent to the error page.", + "updated": 1609175853003 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-002-docs-error-too-few-parameters.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-002-docs-error-too-few-parameters.json index f2ff110cd..f5931ab87 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-002-docs-error-too-few-parameters.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-002-docs-error-too-few-parameters.json @@ -28,7 +28,17 @@ }, { "style": "List", - "text": "Docs Goto Command" + "text": "Docs Goto Command", + "updated": 1609177214092 + }, + { + "style": "List", + "text": "Docs Add Command", + "updated": 1609180038275 + }, + { + "style": "List", + "text": "Docs Delete Command" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-003-docs-error-project-does-not-exist.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-003-docs-error-project-does-not-exist.json index 055e77ead..21b9c8343 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-003-docs-error-project-does-not-exist.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-003-docs-error-project-does-not-exist.json @@ -27,7 +27,16 @@ }, { "style": "List", - "text": "Docs Goto Command" + "text": "Docs Goto Command", + "updated": 1609180469767 + }, + { + "style": "List", + "text": "Docs Add Command" + }, + { + "style": "List", + "text": "Docs Delete Command" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-004-docs-error-category-not-valid.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-004-docs-error-category-not-valid.json index 035cb654e..e28e9ac54 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-004-docs-error-category-not-valid.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-004-docs-error-category-not-valid.json @@ -28,7 +28,17 @@ }, { "style": "List", - "text": "Docs Goto Command" + "text": "Docs Goto Command", + "updated": 1609177229589 + }, + { + "style": "List", + "text": "Docs Add Command", + "updated": 1609180006853 + }, + { + "style": "List", + "text": "Docs Delete Command" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-007-docs-error-only-in-english.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-007-docs-error-only-in-english.json new file mode 100644 index 000000000..6d6c8c2c3 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-007-docs-error-only-in-english.json @@ -0,0 +1,38 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "7", + "type": "Docs Error Only In English", + "definition": { + "text": "Command not available because you are not set in English language.", + "updated": 1609176264266 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Only In English", + "updated": 1609176190365 + }, + { + "style": "Error", + "text": "This command is available only while you are browsing the Docs in English language." + }, + { + "style": "Success", + "text": " Switch to English and try again. ", + "updated": 1609176617797 + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Add Command", + "updated": 1609177338804 + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-008-docs-error-missing-colon.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-008-docs-error-missing-colon.json new file mode 100644 index 000000000..5a690244b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-008-docs-error-missing-colon.json @@ -0,0 +1,39 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "8", + "type": "Docs Error Missing Colon", + "definition": { + "text": "You forgot the colon character \":\" that is part of the syntax of the command. ", + "updated": 1609176951837 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Missing Colon", + "updated": 1609176525475 + }, + { + "style": "Error", + "text": "Syntax Error. Colon character \":\" is missing. ", + "updated": 1609176970772 + }, + { + "style": "Success", + "text": " Check the syntax of the command you are executing and see where to place the colon \":\" character. ", + "updated": 1609176984237 + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Add Command", + "updated": 1609177427004 + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-009-docs-error-missing-to.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-009-docs-error-missing-to.json new file mode 100644 index 000000000..28d651b28 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-009-docs-error-missing-to.json @@ -0,0 +1,34 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "9", + "type": "Docs Error Missing To", + "definition": { + "text": "The word \"to\" is part of the syntax of the command and you did not include it.", + "updated": 1609176884329 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Missing To", + "updated": 1609176777661 + }, + { + "style": "Error", + "text": "Syntax Error. Colon word \"to\" is missing. ", + "updated": 1609177715965 + }, + { + "style": "Success", + "text": " Check the syntax of the command you are executing and see where to place the word \"to\". ", + "updated": 1609177722494 + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Add Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-010-docs-error-missing-from.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-010-docs-error-missing-from.json new file mode 100644 index 000000000..91e48f450 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-010-docs-error-missing-from.json @@ -0,0 +1,33 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "10", + "type": "Docs Error Missing From", + "definition": { + "text": "The word \"from\" is part of the syntax of the command and it is missing.", + "updated": 1609177704402 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Missing From", + "updated": 1609177607792 + }, + { + "style": "Error", + "text": " Syntax Error. Word \"from\" is missing." + }, + { + "style": "Success", + "text": "Check the syntax of the command you are executing and see where to place the word \"from\".", + "updated": 1609177623721 + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-011-docs-error-changes-not-saved.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-011-docs-error-changes-not-saved.json new file mode 100644 index 000000000..32299aa0a --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-011-docs-error-changes-not-saved.json @@ -0,0 +1,34 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "11", + "type": "Docs Error Changes Not Saved", + "definition": { + "text": "It was not possible to save your changes.", + "updated": 1609180131235 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Changes Not Saved", + "updated": 1609180176593 + }, + { + "style": "Error", + "text": "Changes could not be saved. There were one or more problems while saving your changes.", + "updated": 1609180259963 + }, + { + "style": "Success", + "text": "Please check the Client Console to see if there are errors logged there. You might also check the Browser Console for errors logged there.", + "updated": 1609180277501 + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Save Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-012-docs-error-page-already-exists.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-012-docs-error-page-already-exists.json new file mode 100644 index 000000000..9f4692529 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-012-docs-error-page-already-exists.json @@ -0,0 +1,32 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "12", + "type": "Docs Error Page Already Exists", + "definition": { + "text": "The page you are trying to add already exists at Docs.", + "updated": 1609180663496 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Page Already Exists", + "updated": 1609180759921 + }, + { + "style": "Error", + "text": "Page already exists at the Docs." + }, + { + "style": "Success", + "text": "Check the Docs Page Name you used at the command, because it seems that it already exists at the Docs." + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Add Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-013-docs-error-page-does-not-exist.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-013-docs-error-page-does-not-exist.json new file mode 100644 index 000000000..c62184d9a --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-013-docs-error-page-does-not-exist.json @@ -0,0 +1,33 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "13", + "type": "Docs Error Page Does Not Exist", + "definition": { + "text": "The page you are trying to delete does not exist.", + "updated": 1609180948712 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Page Does Not Exists", + "updated": 1609181016148 + }, + { + "style": "Error", + "text": "Page does not already exist at the Docs.", + "updated": 1609181023193 + }, + { + "style": "Success", + "text": " Check the Docs Page Name you used at the command, because it seems that a page with that name does not exist at the Docs." + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-014-docs-error-page-number-mismatch.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-014-docs-error-page-number-mismatch.json new file mode 100644 index 000000000..7a79119e2 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-014-docs-error-page-number-mismatch.json @@ -0,0 +1,33 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "14", + "type": "Docs Error Page Number Mismatch", + "definition": { + "text": "The Docs Page Number provided does not match with the Docs Page Number found at the page you want to delete. ", + "updated": 1609181698772 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Page Number Mismatch", + "updated": 1609181413876 + }, + { + "style": "Error", + "text": "Page Number Mismatch. The Docs Page Number provided does not match the Docs Page Number of the page to be deleted. ", + "updated": 1609181722190 + }, + { + "style": "Summary", + "text": "Check the page you want to delete and get the right page number to use at the command." + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-015-docs-error-toopic-mismatch.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-015-docs-error-toopic-mismatch.json new file mode 100644 index 000000000..0b1eb2da4 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-errors-015-docs-error-toopic-mismatch.json @@ -0,0 +1,33 @@ +{ + "topic": "Docs Commands Errors", + "pageNumber": "15", + "type": "Docs Error Toopic Mismatch", + "definition": { + "text": "The Docs Topic Name provided does not match with the Docs Topic Name found at the page you want to delete.", + "updated": 1609181659359 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Topic Mismatch", + "updated": 1609181600300 + }, + { + "style": "Error", + "text": "Topic Number Mismatch. The Docs Topic Name provided does not match the Docs Topic Name of the page to be deleted.", + "updated": 1609181606847 + }, + { + "style": "Success", + "text": "Check the page you want to delete and get the right Docs Topic Name to use at the command." + }, + { + "style": "Title", + "text": "Applies to" + }, + { + "style": "List", + "text": "Docs Delete Command" + } + ] +} \ 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 9ff49a22b..145fe453f 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -1057,13 +1057,13 @@ function newSuperalgosDocSpace() { if (command.indexOf('Docs.Add') !== 0 && command.indexOf('docs.add') !== 0) { return 'Not Add Command' } if (language !== DEFAULT_LANGUAGE) { - renderCommandResultsPage(["Usage Error. You can only add pages to the Docs while you are navigating it in English."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Only In English', 'Anchor Only In English') return } let splittedCommand = command.split(': ') if (splittedCommand[1] === undefined) { - renderCommandResultsPage(["Syntax Error. Keyword : missing: Example: docs.add Concept to Superalgos: New Concept Name. The keyword is a : character plus a blank space. Type help docs.add to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Missing Colon', 'Anchor Missing Colon') return } let primaryCommand = splittedCommand[0] @@ -1073,17 +1073,17 @@ function newSuperalgosDocSpace() { if (splittedPrimaryCommand[0].toLowerCase() === 'docs.add') { if (splittedPrimaryCommand[2] !== 'to') { - renderCommandResultsPage(["Syntax Error. Keyword to missing: Example: docs.add Concept to Superalgos: New Concept Name. Type help docs.add to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Missing To', 'Anchor Missing To') return } if (splittedPrimaryCommand.length < 4) { - renderCommandResultsPage(["Syntax Error. Too few Add Command parameters. Found " + splittedPrimaryCommand.length + ". Expected at least 4. Type help docs.add to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Too Few Parameters', 'Anchor Too Few Paramenters') return } if (secondaryCommand === '') { - renderCommandResultsPage(["Syntax Error. Node, Concept or Topic name can not be undefined."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid') return } @@ -1099,14 +1099,14 @@ function newSuperalgosDocSpace() { case 'topic': { let splittedSecondaryCommand = secondaryCommand.split('->') if (splittedSecondaryCommand.length < 3) { - renderCommandResultsPage(["Syntax Error. Too few Topic parameters. Found " + splittedSecondaryCommand.length + ". Expected 3. Type help docs.add to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Too Few Parameters', 'Anchor Too Few Paramenters') return } addTopic(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2]) return } default: { - renderCommandResultsPage(["Syntax Error. Expected Node, Concept or Topic. Found " + splittedCommand[1] + ""]) + navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid') return } } @@ -1122,13 +1122,13 @@ function newSuperalgosDocSpace() { if (command.indexOf('Docs.Delete') !== 0 && command.indexOf('docs.delete') !== 0) { return 'Not Delete Command' } if (language !== DEFAULT_LANGUAGE) { - renderCommandResultsPage(["Usage Error. You can only delete pages from the Docs while you are navigating it in English."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Only In English', 'Anchor Only In English') return } let splittedCommand = command.split(': ') if (splittedCommand[1] === undefined) { - renderCommandResultsPage(["Syntax Error. Keyword : missing: Example: docs.delete Concept from Superalgos: Concept Name. The keyword is a : character plus a blank space. Type Hekp docs.delete to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Missing Colon', 'Anchor Missing Colon') return } let primaryCommand = splittedCommand[0] @@ -1138,17 +1138,17 @@ function newSuperalgosDocSpace() { if (splittedPrimaryCommand[0].toLowerCase() === 'docs.delete') { if (splittedPrimaryCommand[2] !== 'from') { - renderCommandResultsPage(["Syntax Error. Keyword from missing: Example: Delete Concept from Superalgos: Concept Name. Type Help docs.delete to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Missing From', 'Anchor Missing From') return } if (splittedPrimaryCommand.length < 4) { - renderCommandResultsPage(["Syntax Error. Too few Delete Command parameters. Found " + splittedPrimaryCommand.length + ". Expected at least 4. Type Help docs.delete to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Too Few Parameters', 'Anchor Too Few Paramenters') return } if (secondaryCommand === '') { - renderCommandResultsPage(["Syntax Error. Node, Concept or Topic name can not be undefined."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid') return } @@ -1164,14 +1164,14 @@ function newSuperalgosDocSpace() { case 'topic': { let splittedSecondaryCommand = secondaryCommand.split('->') if (splittedSecondaryCommand.length < 3) { - renderCommandResultsPage(["Syntax Error. Too few Topic parameters. Found " + splittedSecondaryCommand.length + ". Expected 3. Type help docs.delete to learn the command's syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Too Few Parameters', 'Anchor Too Few Paramenters') return } deleteTopic(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2]) return } default: { - renderCommandResultsPage(["Syntax Error. Expected Node, Concept or Topic. Found " + splittedCommand[1] + ""]) + navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid') return } } @@ -1232,7 +1232,7 @@ function newSuperalgosDocSpace() { if (responseCount === okResponses) { renderCommandResultsPage(["Succesfully saved all the latest changes."]) } else { - renderCommandResultsPage(["Some of the changes could not be saved."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Changes Not Saved', 'Anchor Changes Not Saved') } } } @@ -1250,12 +1250,12 @@ function newSuperalgosDocSpace() { ] } if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(type) if (exist !== undefined) { - renderCommandResultsPage(["Node " + type + " already exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Already Exists', 'Anchor Page Already Exists') return } @@ -1277,12 +1277,12 @@ function newSuperalgosDocSpace() { } if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(type) if (exist !== undefined) { - renderCommandResultsPage(["Concept " + type + " already exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Already Exists', 'Anchor Page Already Exists') return } @@ -1305,12 +1305,12 @@ function newSuperalgosDocSpace() { ] } if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(type) if (exist !== undefined) { - renderCommandResultsPage(["Topic Page " + type + " already exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Already Exists', 'Anchor Page Already Exists') return } @@ -1321,12 +1321,12 @@ function newSuperalgosDocSpace() { function deleteNode(project, type) { if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(type) if (exist === undefined) { - renderCommandResultsPage(["Node " + type + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Does Not Exist', 'Anchor Page Does Not Exist') return } @@ -1344,12 +1344,12 @@ function newSuperalgosDocSpace() { function deleteConcept(project, type) { if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(type) if (exist === undefined) { - renderCommandResultsPage(["Concept " + type + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Does Not Exist', 'Anchor Page Does Not Exist') return } @@ -1367,20 +1367,20 @@ function newSuperalgosDocSpace() { function deleteTopic(project, topic, type, pageNumber) { if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist') return } let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(type) if (exist === undefined) { - renderCommandResultsPage(["Topic " + type + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Does Not Exist', 'Anchor Page Does Not Exist') return } else { if (exist.pageNumber !== pageNumber) { - renderCommandResultsPage(["Page Number " + pageNumber + " does not match with page number found: " + exist.pageNumber + "."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Page Number Mismatch', 'Anchor Page Number Mismatch') return } if (exist.topic !== topic) { - renderCommandResultsPage(["Topic " + topic + " does not match with topic found: " + exist.topic + "."]) + navigateTo('Superalgos', 'Topic', 'Docs Error Topic Mismatch', 'Anchor Topic Mismatch') return } }