Merge branch 'in-app-documentation' of https://github.com/Superalgos/Superalgos into in-app-documentation
This commit is contained in:
commit
3b3c901518
9 files changed
+87
-62
No files matched your search
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"type": "How To Trade ",
|
||||
"definition": {
|
||||
"text": "Write here the summary / definition of this Book."
|
||||
},
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"style": "Chapter",
|
||||
"text": "Superalgos->Docs Styles"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Docs Basics",
|
||||
"pageNumber": "15",
|
||||
"type": "Docs Books",
|
||||
"definition": {
|
||||
"text": "A book is page in the Docs that contains chapters. Chapters points to a Docs Topics and are rendered as the index table of the topic they point to.",
|
||||
"updated": 1609771773385
|
||||
},
|
||||
"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
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"topic": "Docs Basics",
|
||||
"pageNumber": "15",
|
||||
"pageNumber": "16",
|
||||
"type": "Docs Paragraph Styles",
|
||||
"definition": {
|
||||
"text": "Each paragraph at a Docs Page, need to be assigend a style. The most commonly used style is the Docs Text Style.",
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Docs Paragraph Styles",
|
||||
"pageNumber": "24",
|
||||
"type": "Docs Chapter Style",
|
||||
"definition": {
|
||||
"text": "This style is used in Docs Books to define a new chapeter for that book. The style renders in the book's page the index of the Docs Topics referenced.",
|
||||
"updated": 1609771567815
|
||||
},
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11,16 +11,17 @@ function newSuperalgosDocSpace() {
|
||||
documentPage: undefined,
|
||||
commandInterface: undefined,
|
||||
contextMenu: undefined,
|
||||
language: undefined,
|
||||
language: undefined,
|
||||
menuLabelsMap: undefined,
|
||||
currentDocumentBeingRendered: undefined,
|
||||
previousDocumentBeingRendered: undefined,
|
||||
currentDocumentBeingRendered: undefined,
|
||||
previousDocumentBeingRendered: undefined,
|
||||
currentBookBeingRendered: undefined,
|
||||
paragraphMap: undefined, // Here we will store a map of paragraphs from the Docs Node, Concept, Topics or Books Schema in order to find it when we need to update them.
|
||||
textArea: undefined,
|
||||
setUpWorkspaceSchemas: setUpWorkspaceSchemas,
|
||||
setUpWorkspaceSchemas: setUpWorkspaceSchemas,
|
||||
changeLanguage: changeLanguage,
|
||||
enterEditMode: enterEditMode,
|
||||
exitEditMode: exitEditMode,
|
||||
enterEditMode: enterEditMode,
|
||||
exitEditMode: exitEditMode,
|
||||
openSpaceAreaAndNavigateTo: openSpaceAreaAndNavigateTo,
|
||||
navigateTo: navigateTo,
|
||||
scrollToElement: scrollToElement,
|
||||
@@ -47,7 +48,7 @@ function newSuperalgosDocSpace() {
|
||||
let browserResizedEventSubscriptionId
|
||||
let openingEventSubscriptionId
|
||||
let closingEventSubscriptionId
|
||||
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
@@ -70,7 +71,7 @@ function newSuperalgosDocSpace() {
|
||||
thisObject.searchResultsPage.initialize()
|
||||
thisObject.documentPage.initialize()
|
||||
thisObject.footer.initialize()
|
||||
thisObject.commandInterface.initialize()
|
||||
thisObject.commandInterface.initialize()
|
||||
thisObject.contextMenu.initialize()
|
||||
|
||||
isInitialized = true
|
||||
@@ -133,13 +134,13 @@ function newSuperalgosDocSpace() {
|
||||
thisObject.footer.finalize()
|
||||
thisObject.commandInterface.finalize()
|
||||
thisObject.contextMenu.finalize()
|
||||
|
||||
|
||||
thisObject.searchEngine = undefined
|
||||
thisObject.mainSearchPage = undefined
|
||||
thisObject.searchResultsPage = undefined
|
||||
thisObject.documentPage = undefined
|
||||
thisObject.footer = undefined
|
||||
thisObject.commandInterface = undefined
|
||||
thisObject.commandInterface = undefined
|
||||
thisObject.contextMenu = undefined
|
||||
|
||||
thisObject.currentDocumentBeingRendered = undefined
|
||||
@@ -281,23 +282,7 @@ function newSuperalgosDocSpace() {
|
||||
|
||||
function openSpaceAreaAndNavigateTo(project, category, type, anchor, nodeId) {
|
||||
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
|
||||
UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered = {
|
||||
project: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
|
||||
category: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category,
|
||||
type: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type,
|
||||
anchor: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor,
|
||||
nodeId: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId
|
||||
}
|
||||
}
|
||||
|
||||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = {
|
||||
project: project,
|
||||
category: category,
|
||||
type: type.replace('AMPERSAND', '\''),
|
||||
anchor: anchor,
|
||||
nodeId: nodeId
|
||||
}
|
||||
getReadyToNavigate(project, category, type, anchor, nodeId)
|
||||
|
||||
thisObject.sidePanelTab.open()
|
||||
}
|
||||
@@ -307,24 +292,7 @@ function newSuperalgosDocSpace() {
|
||||
EDITOR_ON_FOCUS = false // forced exit
|
||||
UI.projects.superalgos.spaces.docsSpace.paragraphMap = new Map()
|
||||
|
||||
/* Replace the current object with this */
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
|
||||
UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered = {
|
||||
project: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
|
||||
category: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category,
|
||||
type: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type,
|
||||
anchor: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor,
|
||||
nodeId: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId
|
||||
}
|
||||
}
|
||||
|
||||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = {
|
||||
project: project,
|
||||
category: category,
|
||||
type: type.replace('AMPERSAND', '\''),
|
||||
anchor: anchor,
|
||||
nodeId: nodeId
|
||||
}
|
||||
getReadyToNavigate(project, category, type, anchor, nodeId)
|
||||
|
||||
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
|
||||
|
||||
@@ -339,6 +307,37 @@ function newSuperalgosDocSpace() {
|
||||
}
|
||||
}
|
||||
|
||||
function getReadyToNavigate(project, category, type, anchor, nodeId) {
|
||||
/* Replace the current object with this */
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
|
||||
UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered = {
|
||||
project: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
|
||||
category: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category,
|
||||
type: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type,
|
||||
anchor: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor,
|
||||
nodeId: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId
|
||||
}
|
||||
}
|
||||
|
||||
if (category === 'Book') {
|
||||
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = {
|
||||
project: project,
|
||||
category: category,
|
||||
type: type.replace('AMPERSAND', '\''),
|
||||
anchor: anchor,
|
||||
nodeId: nodeId
|
||||
}
|
||||
}
|
||||
|
||||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = {
|
||||
project: project,
|
||||
category: category,
|
||||
type: type.replace('AMPERSAND', '\''),
|
||||
anchor: anchor,
|
||||
nodeId: nodeId
|
||||
}
|
||||
}
|
||||
|
||||
function resize() {
|
||||
thisObject.container.frame.width = UI.projects.superalgos.globals.docs.DOCS_SPACE_WIDTH
|
||||
thisObject.container.frame.height = browserCanvas.height // - TOP_SPACE_HEIGHT
|
||||
|
||||
@@ -429,6 +429,10 @@ function newSuperalgosDocsDocumentPage() {
|
||||
|
||||
buildOrderedTopicPageIndex(chapterName)
|
||||
|
||||
if (orderedTopicPageIndexArray.length === 0) {
|
||||
return 'Chapter paragraph style Syntax Error. The Topic <i>' + chapterName + '</i> could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.'
|
||||
}
|
||||
|
||||
let key = 'auto-generated-paragraph-' + autoGeneratedParagraphIndex
|
||||
paragraph = {
|
||||
style: "Title",
|
||||
|
||||
@@ -33,6 +33,9 @@ function newSuperalgosDocsFooter() {
|
||||
if (UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered !== undefined ) {
|
||||
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.project + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.category + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.type + '\')"><button>BACK</button></span>'
|
||||
}
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered !== undefined ) {
|
||||
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.project + '\', \'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.category + '\', \'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.type + '\')"><button>TO BOOK</button></span>'
|
||||
}
|
||||
HTML = HTML + '</div>'
|
||||
HTML = HTML + '</div>'
|
||||
HTML = HTML + '</div>'
|
||||
|
||||
@@ -51,6 +51,7 @@ function newSuperalgosDocsMainSearchPage() {
|
||||
}
|
||||
element.addEventListener("keyup", function (event) {
|
||||
if (event.key === "Enter" || event.keyCode === 13) {
|
||||
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = undefined
|
||||
UI.projects.superalgos.spaces.docsSpace.contextMenu.forceOutClick()
|
||||
UI.projects.superalgos.spaces.docsSpace.commandInterface.command = element.value
|
||||
UI.projects.superalgos.spaces.docsSpace.commandInterface.detectCommands()
|
||||
|
||||
@@ -150,6 +150,10 @@ function newSuperalgosDocsSearchResultsPage() {
|
||||
documentPoints = documentPoints + thisPhraseCount * 1
|
||||
break
|
||||
}
|
||||
case 'chapter': {
|
||||
documentPoints = documentPoints + thisPhraseCount * 8
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user