From c35f0d04a73d95e3293f0bbdf9f8c4584fe086d8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 22 Dec 2020 09:04:18 +0100 Subject: [PATCH] Update DocsSpace.js --- .../Superalgos/UI/Spaces/Docs-Space/DocsSpace.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index c9bbff4ae..b1c241b2a 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -806,8 +806,8 @@ function newSuperalgosDocSpace() { "Example: Add Node to Superalgos Task Manager", "Option 2: Add Concpet to Project Concept Name", "Example: Add Concept to Superalgos Attaching Nodes", - "Option 3: Add Topic to Project Topic->Part Name", - "Example: Add Topic to Superalgos Contributing->Code" + "Option 3: Add Topic to Project Topic->Part Name->Page Number", + "Example: Add Topic to Superalgos Contributing->Code->2" ] ) return @@ -823,7 +823,7 @@ function newSuperalgosDocSpace() { } if (splittedCommand.length < 5) { - renderCommandResultsPage(["Syntax Error. Too few parameters. Found " + splittedCommand.length + ". Expected at least 5. Type Hekp Add to learn the command's syntax."]) + renderCommandResultsPage(["Syntax Error. Too few Add Command parameters. Found " + splittedCommand.length + ". Expected at least 5. Type Hekp Add to learn the command's syntax."]) return } @@ -845,7 +845,11 @@ function newSuperalgosDocSpace() { case 'topic': { let topicPlusPartType = remainderParams let splittedTopic = topicPlusPartType.split('->') - addTopic(splittedCommand[3], splittedTopic[0], splittedTopic[1]) + if (splittedTopic.length < 3) { + renderCommandResultsPage(["Syntax Error. Too few Topic parameters. Found " + splittedTopic.length + ". Expected at least 3. Type Hekp Add to learn the command's syntax."]) + return + } + addTopic(splittedCommand[3], splittedTopic[0], splittedTopic[1], splittedTopic[2]) return } default: { @@ -898,9 +902,10 @@ function newSuperalgosDocSpace() { navigateTo('Concept', type, project) } - function addTopic(project, topic, type) { + function addTopic(project, topic, type, pageNumber) { let template = { topic: topic, + pageNumber: pageNumber, type: type, definition: "Write here the definition of this Concept.", paragraphs: [