Topic navigation ready
This commit is contained in:
1 parent
264ee04654
commit
83958d7ac4
2 files changed
+54
-25
No files matched your search
@@ -150,12 +150,22 @@ function newSuperalgosDocsDocumentPage() {
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
|
||||
|
||||
buildOrderedTopicPageIndex(thisObject.docsSchemaDocument.topic)
|
||||
generateTopicPreviousAndNextPageNavigation()
|
||||
|
||||
HTML = HTML = HTML + '<div class="docs-topic-index">' // Container for whole Topic Navigation including buttons, title and index
|
||||
|
||||
/* Topic Title */
|
||||
titleLabel = thisObject.docsSchemaDocument.topic + ' Topic Content'
|
||||
titleLabel = thisObject.docsSchemaDocument.topic + ' Topic Navigation'
|
||||
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
|
||||
|
||||
generateTopicPreviousAndNextPageNavigation()
|
||||
|
||||
/* TOC*/
|
||||
|
||||
HTML = HTML + '<h3 class="docs-h3"> Table of Contents</h3>'
|
||||
|
||||
generateTopicMultiPageIndex()
|
||||
|
||||
HTML = HTML = HTML + '</div>' // END Container for whole Topic Navigation
|
||||
}
|
||||
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
|
||||
@@ -164,7 +174,7 @@ function newSuperalgosDocsDocumentPage() {
|
||||
generateTutorialPreviousAndNextPageNavigation()
|
||||
/* Tutorial Title */
|
||||
titleLabel = thisObject.docsSchemaDocument.tutorial + ' Tutorial Content'
|
||||
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
|
||||
HTML = HTML + '<h2 id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2>'
|
||||
|
||||
generateTutorialMultiPageIndex()
|
||||
}
|
||||
@@ -269,13 +279,15 @@ function newSuperalgosDocsDocumentPage() {
|
||||
previousPage = orderedTopicPageIndexArray[i - 1]
|
||||
nextPage = orderedTopicPageIndexArray[i + 1]
|
||||
|
||||
HTML = HTML + '<p>You just read page <strong>' + thisObject.docsSchemaDocument.pageNumber + '</strong> in the series. Click the buttons below for the previous and next pages...</p>'
|
||||
|
||||
HTML = HTML + '<div class="docs-topic-navigation"><div>'
|
||||
if (previousPage !== undefined) {
|
||||
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button>' + previousPage.type + '</button></span>'
|
||||
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button>' + previousPage.type + '</button></span><br/>←'
|
||||
}
|
||||
HTML = HTML + '</div><div> << Current Page: ' + thisObject.docsSchemaDocument.pageNumber + ' >> </div><div>'
|
||||
HTML = HTML + '</div><div>'
|
||||
if (nextPage !== undefined) {
|
||||
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button>' + nextPage.type + '</button></span>'
|
||||
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button>' + nextPage.type + '</button></span><br/>→'
|
||||
}
|
||||
HTML = HTML + '</div></div>'
|
||||
return
|
||||
@@ -292,6 +304,8 @@ function newSuperalgosDocsDocumentPage() {
|
||||
let key = 'auto-generated-index-paragraph-' + autoGeneratedParagraphIndex
|
||||
let paragraph
|
||||
|
||||
|
||||
|
||||
for (let i = 0; i < orderedTopicPageIndexArray.length; i++) {
|
||||
let arrayItem = orderedTopicPageIndexArray[i]
|
||||
key = 'auto-generated-index-paragraph-' + autoGeneratedParagraphIndex
|
||||
@@ -300,8 +314,9 @@ function newSuperalgosDocsDocumentPage() {
|
||||
text: "" + arrayItem.type + ""
|
||||
}
|
||||
autoGeneratedParagraphIndex++
|
||||
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a class="docs-link" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
|
||||
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function buildOrderedTutorialPageIndex(tutorial) {
|
||||
|
||||
Reference in new issue
Block a user