From 836fa4799becc7ef911d0b6e75ab0e8d3add6da9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 22 Dec 2020 14:12:37 +0100 Subject: [PATCH] fixes --- Client/httpInterface.js | 6 +++--- .../Superalgos/Schemas/Docs-Concepts/attaching.json | 12 ++++-------- .../Schemas/Docs-Concepts/referencing.json | 12 ++++-------- .../Schemas/Docs-Concepts/test-concept-here.json | 10 ++++++++++ .../Superalgos/UI/Spaces/Docs-Space/DocsSpace.js | 3 ++- 5 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Concepts/test-concept-here.json diff --git a/Client/httpInterface.js b/Client/httpInterface.js index d5bd55eac..04bf739c3 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -352,7 +352,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE for (let i = 0; i < docsSchema.length; i++) { let schemaDocument = docsSchema[i] - let fileContent = JSON.stringify(schemaDocument) + let fileContent = JSON.stringify(schemaDocument, undefined, 4) console.log('schemaDocument', schemaDocument) console.log('fileContent', fileContent) @@ -361,13 +361,13 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let fileName = schemaDocument.type.toLowerCase() for (let j = 0; j < 10; j++) { - fileName = fileName.replaceAll(' ', '-') + fileName = fileName.replace(' ', '-') } fileName = fileName + '.json' let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Concepts' - console.log('fileName', filename) + console.log('fileName', fileName) console.log('filePath', filePath) fs.writeFileSync(filePath + '/' + fileName, fileContent) } diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/attaching.json b/Projects/Superalgos/Schemas/Docs-Concepts/attaching.json index de73f9eb4..ef3053079 100644 --- a/Projects/Superalgos/Schemas/Docs-Concepts/attaching.json +++ b/Projects/Superalgos/Schemas/Docs-Concepts/attaching.json @@ -1,8 +1,4 @@ - - { - "type": "Attaching", - "definition": "Nodes can be attached" - } - - - +{ + "type": "Attaching", + "definition": "Nodes can be attached" +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/referencing.json b/Projects/Superalgos/Schemas/Docs-Concepts/referencing.json index 1a20e058a..75115953f 100644 --- a/Projects/Superalgos/Schemas/Docs-Concepts/referencing.json +++ b/Projects/Superalgos/Schemas/Docs-Concepts/referencing.json @@ -1,8 +1,4 @@ - - { - "type": "Referencing", - "definition": "Nodes can reference other nodes" - } - - - +{ + "type": "Referencing", + "definition": "Nodes can reference other nodes" +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/test-concept-here.json b/Projects/Superalgos/Schemas/Docs-Concepts/test-concept-here.json new file mode 100644 index 000000000..a538c3d6b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Concepts/test-concept-here.json @@ -0,0 +1,10 @@ +{ + "type": "Test Concept Here", + "definition": "Write here the definition of this Concept.", + "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/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index 3f1e5aba6..ccaf26631 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -987,7 +987,7 @@ function newSuperalgosDocSpace() { renderCommandResultsPage(["Succesfully rebuild the search engine indexes."]) } - function checkUReIndexCommand() { + function checkUSaveCommand() { if (command.toLowerCase() === 'help save') { renderCommandResultsPage( [ @@ -1022,6 +1022,7 @@ function newSuperalgosDocSpace() { function onResponse(err, data) { /* Lets check the result of the call through the http interface */ + data = JSON.parse(data) if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { okResponses++ }