From bc5def6af688900553646d6b5a7ce221d14d25cc Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 12 Jan 2021 14:48:52 +0100 Subject: [PATCH] Update Command --- .../Superalgos/UI/Spaces/Docs-Space/DocumentPage.js | 2 -- Projects/Superalgos/UI/Utilities/Docs.js | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js index c87ffc495..661ff43f6 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js @@ -1874,8 +1874,6 @@ function newSuperalgosDocsDocumentPage() { } function exitEditMode() { - /* This will make the Client to save this in a file overwritting the previous version*/ - thisObject.docsSchemaDocument.updated = true /* We will update the paragraph that was being edited*/ let editing diff --git a/Projects/Superalgos/UI/Utilities/Docs.js b/Projects/Superalgos/UI/Utilities/Docs.js index 7e3dc6f81..27151d24c 100644 --- a/Projects/Superalgos/UI/Utilities/Docs.js +++ b/Projects/Superalgos/UI/Utilities/Docs.js @@ -111,8 +111,13 @@ function newSuperalgosUtilitiesDocs() { function setTextBasedOnLanguage(paragraph, text) { if (UI.projects.superalgos.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) { if (paragraph.text !== text) { + + /* This will make the Client to save this in a file overwritting the previous version*/ + UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true + paragraph.text = text paragraph.updated = (new Date()).valueOf() + } return } else { @@ -131,6 +136,10 @@ function newSuperalgosUtilitiesDocs() { let translation = paragraph.translations[i] if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) { if (translation.text !== text) { + + /* This will make the Client to save this in a file overwritting the previous version*/ + UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true + translation.text = text translation.updated = (new Date()).valueOf() } @@ -143,6 +152,9 @@ function newSuperalgosUtilitiesDocs() { updated: (new Date()).valueOf() } paragraph.translations.push(translation) + + /* This will make the Client to save this in a file overwritting the previous version*/ + UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true return }