From 87eb9941ef0851fcdec5e4a610135777d04a191b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 28 Dec 2020 14:04:12 +0100 Subject: [PATCH] bug fixed --- Client/WebServer/css/docs.css | 2 +- .../docs-commands-002-docs-goto-command.json | 4 +- ...docs-commands-010-docs-command-errors.json | 66 +++++++++++++++++++ .../UI/Spaces/Docs-Space/DocsSpace.js | 8 +-- 4 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-commands-010-docs-command-errors.json diff --git a/Client/WebServer/css/docs.css b/Client/WebServer/css/docs.css index ca3a99f7e..5ebdcf3d9 100644 --- a/Client/WebServer/css/docs.css +++ b/Client/WebServer/css/docs.css @@ -220,7 +220,7 @@ width: 95%; color: #f1e426; background-color: #ff3131; border-color: #c23d53; -padding: 15px; +padding: 50px; border: 1px solid transparent; border-radius: 4px; margin: 20px 0; diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-002-docs-goto-command.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-002-docs-goto-command.json index c3ea16d70..2050dd3d5 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-002-docs-goto-command.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-002-docs-goto-command.json @@ -51,9 +51,9 @@ "text": "docs.goto Superalgos->Node->Task" }, { - "style": "Javascript", + "style": "Json", "text": "docs.goto Superalgos->Topic->Docs Text Style->Anchor 1", - "updated": 1609151565628 + "updated": 1609158328191 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-010-docs-command-errors.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-010-docs-command-errors.json new file mode 100644 index 000000000..73c445587 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-010-docs-command-errors.json @@ -0,0 +1,66 @@ +{ + "topic": "Docs Commands", + "pageNumber": "10", + "type": "Docs Command Errors", + "definition": { + "text": "While executing a command, you might receive different types of error messanges. These are described below. ", + "updated": 1609159174480 + }, + "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 + }, + { + "style": "Anchor", + "text": "Anchor Too Few Paramenters" + }, + { + "style": "Title", + "text": "Too few parameters" + }, + { + "style": "Error", + "text": "Syntax error: Too few parameters.", + "updated": 1609160135644 + }, + { + "style": "Success", + "text": "Check the command syntax for a detailed list of parameters required." + }, + { + "style": "Anchor", + "text": "Anchor Project Does Not Exist" + }, + { + "style": "Title", + "text": "Project does not exist" + }, + { + "style": "Error", + "text": "The Project you have specified, does not exist. ", + "updated": 1609160205674 + }, + { + "style": "Success", + "text": "Check that you typed the Project name correctly. Project names are key-sensitive." + }, + { + "style": "Text", + "text": "3" + }, + { + "style": "Text", + "text": "4" + }, + { + "style": "Text", + "text": "5" + }, + { + "style": "Text", + "text": "6" + } + ] +} \ 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 7dcb1be86..b580a4c3a 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -1001,7 +1001,7 @@ function newSuperalgosDocSpace() { let splittedCommand = command.split(' ') if (splittedCommand[1] === undefined) { - renderCommandResultsPage(["Syntax error: Too few parameters. Use help docs.goto to learn this command syntax."]) + navigateTo('Superalgos', 'Topic', 'Docs Command Errors', 'Anchor Too Few Paramenters') return } let secondaryCommand = command.substring(command.indexOf(' ') + 1, command.length) @@ -1012,7 +1012,7 @@ function newSuperalgosDocSpace() { let anchor = splittedSecondaryCommand[3] if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - renderCommandResultsPage(["Project " + project + " does not exist."]) + navigateTo('Superalgos', 'Topic', 'Docs Command Errors', 'Anchor Project Does Not Exist') return } let docsSchemaDocument @@ -3546,8 +3546,8 @@ function newSuperalgosDocSpace() { function addBold(text) { let splittedText = text.split(':') - if (splittedText.length > 1 && splittedText[1].length > 0) { - return '' + splittedText[0] + ':' + '' + splittedText[1] + if (text.indexOf(':' >= 0)) { + return '' + text.substring(0, text.indexOf(':') + 1) + '' + text.substring(text.indexOf(':') + 1, text.length) } else { return text }