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

Contribution: JS at Tutorials
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-01-11 22:27:25 +01:00
commit f7bb2d6fc5
13 files changed
+48 -18

No files matched your search

@@ -0,0 +1,30 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "17",
"type": "No Matching Topic Or Tutorial Found",
"definition": {
"text": "The Topic or Tutorial you specified did not produce any match of pages within that Topic or Tutorial.",
"updated": 1610398888306
},
"paragraphs": [
{
"style": "Error",
"text": "No pages found. There are no Topics or Tutorials with the name provided.",
"updated": 1610398925565
},
{
"style": "Success",
"text": "Tip: Check that the name Topic or Tutorial name provided is correctly spelled.",
"updated": 1610398957505
},
{
"style": "Title",
"text": "Applies to"
},
{
"style": "List",
"text": "Docs Repaginate Command",
"updated": 1610398971728
}
]
}
@@ -550,27 +550,17 @@ function newSuperalgosDocsCommmandInterface() {
query
)
if (orderedArray.length = 0) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'No Matching Topic Or Tutorial Found')
return
}
let pageNumber = 1
for (let i = 0; i < orderedArray.length; i++) {
schemaDocument = orderedArray[i]
switch (category) {
case 'Topic': {
if (schemaDocument.topic === query) {
schemaDocument.pageNumber = pageNumber
pageNumber++
schemaDocument.updated = true
}
break
}
case 'Tutorial': {
if (schemaDocument.tutorial === query) {
schemaDocument.pageNumber = pageNumber
pageNumber++
schemaDocument.updated = true
}
break
}
}
schemaDocument.pageNumber = pageNumber
pageNumber++
schemaDocument.updated = true
}
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Repagination Succeed')
}
@@ -1265,6 +1265,16 @@ function newSuperalgosTutorialSpace() {
html = html + '<div class="tutorial-font-small">' + text + '</div>'
break
}
case 'Json': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<pre><code class="language-json">' + text + '</code></pre>'
break
}
case 'Javascript': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<pre><code class="language-json">' + text + '</code></pre>'
break
}
case 'List': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)