Merge pull request #343 from Luis-Fernando-Molina/in-app-documentation

Contribution: Update Command
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-01-12 14:49:28 +01:00
commit 27a5979393
2 files changed
+12 -2

No files matched your search

@@ -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
+12
View File
@@ -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
}