Repaginate working
This commit is contained in:
1 parent
9289b6eb10
commit
b0de0dcfd3
8 files changed
+53
-105
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "Docs Commands",
|
||||
"pageNumber": "7",
|
||||
"type": "Docs Repaginate Command",
|
||||
"definition": {
|
||||
"text": "When you add a Docs Topic Page or a Docs Tutorial Page, you define the page number for it, that is will ultimately defines the position of the page within that topic or tutorial table of contents. The technique to add a page in-between other pages is to use decimal values. After that you can use the Repaginate command in order to recalculate all page numbers and leave the whole set with integer numbers.",
|
||||
"updated": 1610392867410
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Syntax",
|
||||
"updated": 1610393031768
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "docs.repaginate Category from Project: Topic or Tutorial name."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Properties"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Category: It must be either Topic or Tutorial."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Project: Any existing already integrated project."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Topic or Tutorial name: The name given tu the Topic or Tutorial that you want to repaginate."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Example"
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "docs.repaginate Topic from Superalgos: Docs Commands"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 1,
|
||||
"type": "Vaina 1",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 1",
|
||||
"updated": 1610381133258
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 2,
|
||||
"type": "Vaina 2",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 2",
|
||||
"updated": 1610381139634
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 3,
|
||||
"type": "Vaina 3",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 3",
|
||||
"updated": 1610381169574
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 4,
|
||||
"type": "Vaina 4",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 4",
|
||||
"updated": 1610381177981
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 5,
|
||||
"type": "Vaina 5",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 5",
|
||||
"updated": 1610381184235
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"topic": "Vaina",
|
||||
"pageNumber": 6,
|
||||
"type": "Vaina 2.5",
|
||||
"definition": {
|
||||
"text": "Write here a summary for this topic page."
|
||||
},
|
||||
"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. 2.5",
|
||||
"updated": 1610381151723
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -544,28 +544,22 @@ function newSuperalgosDocsCommmandInterface() {
|
||||
return
|
||||
}
|
||||
|
||||
let docsSchema
|
||||
switch (category) {
|
||||
case 'Topic': {
|
||||
docsSchema = SCHEMAS_BY_PROJECT.get(project).array.docsTopicSchema
|
||||
break
|
||||
}
|
||||
case 'Tutorial': {
|
||||
docsSchema = SCHEMAS_BY_PROJECT.get(project).array.docsTutorialSchema
|
||||
break
|
||||
}
|
||||
}
|
||||
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
|
||||
project,
|
||||
category,
|
||||
query
|
||||
)
|
||||
|
||||
let pageNumber = 1
|
||||
for (let i = 0; i < docsSchema.length; i++) {
|
||||
schemaDocument = docsSchema[i]
|
||||
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': {
|
||||
@@ -573,7 +567,7 @@ function newSuperalgosDocsCommmandInterface() {
|
||||
schemaDocument.pageNumber = pageNumber
|
||||
pageNumber++
|
||||
schemaDocument.updated = true
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user