diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index dff18442b..389a30fd4 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -137,105 +137,105 @@ function newSuperalgosDocSpace() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Javascript' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toJson() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Json' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toText() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Text' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toTitle() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Title' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toSubtitle() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Subtitle' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toNote() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Note' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toWarning() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Warning' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toImportant() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Important' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toSuccess() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Success' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toCallout() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Callout' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toSummary() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Summary' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toList() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'List' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toTable() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Table' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toGif() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Gif' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } function toPng() { let docSchemaParagraph = paragraphMap.get(selectedParagraph.id) docSchemaParagraph.style = 'Png' contextMenuForceOutClick() - renderPage() + renderDocumentPage() } } @@ -493,7 +493,7 @@ function newSuperalgosDocSpace() { } } EDITOR_ON_FOCUS = false - renderPage() + renderDocumentPage() } } @@ -754,26 +754,17 @@ function newSuperalgosDocSpace() { } function buildHTML() { - let HTML = '' - - // Logo & Search Box - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '' - HTML = HTML + '
' - HTML = HTML + '
' + const tabs = ['All', 'Nodes', 'Concepts', 'Topics'] + let HTML = addSearchHeader() // Tabs HTML = HTML + '
' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' - HTML = HTML + '' + let checked = ' checked=""' + for (let i = 0; i < tabs.length; i++) { + let tab = tabs[i] + HTML = HTML + '' + checked = '' + } // Results HTML = HTML + '
' @@ -786,7 +777,7 @@ function newSuperalgosDocSpace() { HTML = HTML + '
' HTML = HTML + '

' + result.documentIndex.project + ' > ' + result.documentIndex.documentCategory + '

' - HTML = HTML + '

' + result.documentIndex.document.type + '

' + HTML = HTML + '

' + result.documentIndex.document.type + '

' HTML = HTML + '

' + result.documentIndex.document.definition + '

' HTML = HTML + '
' } @@ -889,12 +880,12 @@ function newSuperalgosDocSpace() { project: project } - renderPage() - scrollToElement('docs-context-menu-clickeable-div') + renderDocumentPage() + scrollToElement('docs-space-div') } - function renderPage() { + function renderDocumentPage() { disableCollapsibleContent() @@ -923,7 +914,7 @@ function newSuperalgosDocSpace() { function buildHtmlPage() { - let HTML = '' + let HTML = addSearchHeader() HTML = HTML + '
' // Clickeable Container Starts @@ -967,6 +958,7 @@ function newSuperalgosDocSpace() { docsSpaceDiv.innerHTML = HTML + addFooter() hightlightEmbeddedCode() + detectEnterOnSearchBox() /* After generating the html, we will add the images at all the points we know @@ -1804,17 +1796,30 @@ function newSuperalgosDocSpace() { } } + function addSearchHeader() { + let HTML = '' + // Logo & Search Box + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '' + HTML = HTML + '
' + HTML = HTML + '
' + + return HTML + } + function addFooter() { let HTML = '' HTML = HTML + '