Technical Debt Payment: Moving Docs and Tutorials to Education Project

This commit is contained in:
Luis Fernando Molina committed 2021-06-09 15:18:07 +02:00
1 parent e75c45293d
commit 71540e4b68
36 files changed
+748 -699

No files matched your search

+4 -4
View File
@@ -77,21 +77,21 @@
<tr>
<td align="center">
<label class="tutorial-font-small tutorial-stop-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.stop()"
onclick="UI.projects.education.spaces.tutorialSpace.stop()"
value="">&nbsp;&nbsp;Stop&nbsp;&nbsp;&nbsp;</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-skip-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.skip()"
onclick="UI.projects.education.spaces.tutorialSpace.skip()"
value="">&nbsp;&nbsp;Skip&nbsp;&nbsp;&nbsp;</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-previous-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.previous()" value="">Previous</label>
onclick="UI.projects.education.spaces.tutorialSpace.previous()" value="">Previous</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-next-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.next()"
onclick="UI.projects.education.spaces.tutorialSpace.next()"
value="">&nbsp;&nbsp;Next&nbsp;&nbsp;&nbsp;</label>
</td>
</tr>
@@ -1,4 +1,4 @@
exports.newSuperalgosUtilitiesDocsFunctions = function () {
exports.newEducationUtilitiesDocsFunctions = function () {
let thisObject = {
buildPlaceholder: buildPlaceholder
@@ -0,0 +1,26 @@
function newEducationActionSwitch() {
let thisObject = {
executeAction: executeAction,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize() {
/* Nothing to initialize since a Function Library does not hold any state. */
}
async function executeAction(action) {
switch (action.name) {
case 'Action Name': {
// Example: return UI.projects.superalgos.functionLibraries.onFocus.getNodeThatIsOnFocus(action.node)
}
}
}
}
@@ -1,4 +1,4 @@
function newSuperalgosGlobalsDocs() {
function newEducationGlobalsDocs() {
let thisObject = {
NEW_PARAGRAPH_TEXT: "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository.",
DEFAULT_LANGUAGE: 'EN',
@@ -21,7 +21,7 @@ function newSuperalgosDocsCommmandInterface() {
if (detectDocsCommands() === true) { return }
/* If we can not detect any app or docs commands, then we assume the users is running a search query */
UI.projects.superalgos.spaces.docsSpace.searchResultsPage.render()
UI.projects.education.spaces.docsSpace.searchResultsPage.render()
}
function detectAppCommands() {
@@ -29,14 +29,14 @@ function newSuperalgosDocsCommmandInterface() {
if (checkUpdateCommand() === undefined) { return true }
function checkContributeCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.contribute') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Contribute Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.contribute') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Contribute Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('App.Contribute') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('app.contribute') !== 0) { return 'Not Contribute Commands' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('App.Contribute') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('app.contribute') !== 0) { return 'Not Contribute Commands' }
/* Set up the commit message */
let message = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.trim().substring(UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.superalgos.spaces.docsSpace.commandInterface.command.length)
let message = UI.projects.education.spaces.docsSpace.commandInterface.command.trim().substring(UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.education.spaces.docsSpace.commandInterface.command.length)
if (message.toLowerCase() === 'app.contribute') {
message = 'This is my contribution to Superalgos'
}
@@ -44,21 +44,21 @@ function newSuperalgosDocsCommmandInterface() {
/* Find the Username and Password */
let apisNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs')
if (apisNode === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
if (apisNode.githubAPI === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
let config = JSON.parse(apisNode.githubAPI.config)
if (config.username === undefined || config.username === "") {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
if (config.token === undefined || config.token === "") {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
@@ -71,11 +71,11 @@ function newSuperalgosDocsCommmandInterface() {
message + '/' +
config.username + '/' +
config.token + '/' +
UI.projects.superalgos.spaces.docsSpace.currentBranch + '/' +
UI.projects.superalgos.spaces.docsSpace.contributionsBranch
UI.projects.education.spaces.docsSpace.currentBranch + '/' +
UI.projects.education.spaces.docsSpace.contributionsBranch
, onResponse)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Creating Pull Request')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Creating Pull Request')
return
@@ -83,9 +83,9 @@ function newSuperalgosDocsCommmandInterface() {
/* Lets check the result of the call through the http interface */
data = JSON.parse(data)
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Contribution Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Contribution Done')
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,
data.docs.category,
data.docs.type,
@@ -98,14 +98,14 @@ function newSuperalgosDocsCommmandInterface() {
}
function checkUpdateCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.update') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Update Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.update') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Update Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('App.Update') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('app.update') !== 0) { return 'Not Update Commands' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('App.Update') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('app.update') !== 0) { return 'Not Update Commands' }
httpRequest(undefined, 'App/Update/' + UI.projects.superalgos.spaces.docsSpace.currentBranch, onResponse)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Updating Your Local App')
httpRequest(undefined, 'App/Update/' + UI.projects.education.spaces.docsSpace.currentBranch, onResponse)
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Updating Your Local App')
return
@@ -114,12 +114,12 @@ function newSuperalgosDocsCommmandInterface() {
data = JSON.parse(data)
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.CUSTOM_OK_RESPONSE.result) {
if (data.message.summary.changes + data.message.summary.deletions + data.message.summary.insertions > 0) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Update Done - New Version Found')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Update Done - New Version Found')
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Update Done - Already Up-To-Date')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message - Update Done - Already Up-To-Date')
}
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,
data.docs.category,
data.docs.type,
@@ -143,27 +143,27 @@ function newSuperalgosDocsCommmandInterface() {
if (checkUSaveCommand() === undefined) { return true }
function checkHelpCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Help Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Help Command')
return
}
return 'Not Help Command'
}
function checkGotoCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.goto') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Goto Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.goto') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Goto Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Goto') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.goto') !== 0) { return 'Not Goto Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Goto') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.goto') !== 0) { return 'Not Goto Command' }
let splittedCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.split(' ')
let splittedCommand = UI.projects.education.spaces.docsSpace.commandInterface.command.split(' ')
if (splittedCommand[1] === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
let secondaryCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.substring(UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.superalgos.spaces.docsSpace.commandInterface.command.length)
let secondaryCommand = UI.projects.education.spaces.docsSpace.commandInterface.command.substring(UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.education.spaces.docsSpace.commandInterface.command.length)
let splittedSecondaryCommand = secondaryCommand.split('->')
let project = splittedSecondaryCommand[0]
let category = splittedSecondaryCommand[1]
@@ -171,7 +171,7 @@ function newSuperalgosDocsCommmandInterface() {
let anchor = splittedSecondaryCommand[3]
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let docsSchemaDocument
@@ -201,37 +201,37 @@ function newSuperalgosDocsCommmandInterface() {
break
}
default: {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
}
if (docsSchemaDocument === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Not Found', 'Anchor Page Not Found')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Not Found', 'Anchor Page Not Found')
return
}
if (docsSchemaDocument.paragraphs === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page With No Paragraphs', 'Anchor Page With No Paragraphs')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page With No Paragraphs', 'Anchor Page With No Paragraphs')
return
}
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, category, type, anchor, undefined)
UI.projects.education.spaces.docsSpace.navigateTo(project, category, type, anchor, undefined)
}
function checkAddCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.add') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Add Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.add') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Add Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Add') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.add') !== 0) { return 'Not Add Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Add') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.add') !== 0) { return 'Not Add Command' }
if (UI.projects.superalgos.spaces.docsSpace.language !== UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Only In English', 'Anchor Only In English')
if (UI.projects.education.spaces.docsSpace.language !== UI.projects.education.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Only In English', 'Anchor Only In English')
return
}
let splittedCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.split(': ')
let splittedCommand = UI.projects.education.spaces.docsSpace.commandInterface.command.split(': ')
if (splittedCommand[1] === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
return
}
let primaryCommand = splittedCommand[0]
@@ -241,17 +241,17 @@ function newSuperalgosDocsCommmandInterface() {
if (splittedPrimaryCommand[0].toLowerCase() === 'docs.add') {
if (splittedPrimaryCommand[2] !== 'to') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing To', 'Anchor Missing To')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing To', 'Anchor Missing To')
return
}
if (splittedPrimaryCommand.length < 4) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
if (secondaryCommand === '') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
@@ -267,7 +267,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'topic': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 2) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
addTopic(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -276,7 +276,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'tutorial': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 2) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
addTutorial(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -285,7 +285,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'review': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 2) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
addReview(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -296,7 +296,7 @@ function newSuperalgosDocsCommmandInterface() {
return
}
default: {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
}
@@ -305,20 +305,20 @@ function newSuperalgosDocsCommmandInterface() {
}
function checkDeleteCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.delete') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Delete Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.delete') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Delete Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Delete') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.delete') !== 0) { return 'Not Delete Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Delete') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.delete') !== 0) { return 'Not Delete Command' }
if (UI.projects.superalgos.spaces.docsSpace.language !== UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Only In English', 'Anchor Only In English')
if (UI.projects.education.spaces.docsSpace.language !== UI.projects.education.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Only In English', 'Anchor Only In English')
return
}
let splittedCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.split(': ')
let splittedCommand = UI.projects.education.spaces.docsSpace.commandInterface.command.split(': ')
if (splittedCommand[1] === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
return
}
let primaryCommand = splittedCommand[0]
@@ -328,17 +328,17 @@ function newSuperalgosDocsCommmandInterface() {
if (splittedPrimaryCommand[0].toLowerCase() === 'docs.delete') {
if (splittedPrimaryCommand[2] !== 'from') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing From', 'Anchor Missing From')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing From', 'Anchor Missing From')
return
}
if (splittedPrimaryCommand.length < 4) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
if (secondaryCommand === '') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
@@ -354,7 +354,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'topic': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 3) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
deleteTopic(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -363,7 +363,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'tutorial': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 3) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
deleteTutorial(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -372,7 +372,7 @@ function newSuperalgosDocsCommmandInterface() {
case 'review': {
let splittedSecondaryCommand = secondaryCommand.split('->')
if (splittedSecondaryCommand.length < 3) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
deleteReview(splittedPrimaryCommand[3], splittedSecondaryCommand[0], splittedSecondaryCommand[1], splittedSecondaryCommand[2])
@@ -383,7 +383,7 @@ function newSuperalgosDocsCommmandInterface() {
return
}
default: {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
}
@@ -392,15 +392,15 @@ function newSuperalgosDocsCommmandInterface() {
}
function checkRepaginateCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.repaginate') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Repaginate Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.repaginate') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Repaginate Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Repaginate') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.repaginate') !== 0) { return 'Not Repaginate Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Repaginate') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.repaginate') !== 0) { return 'Not Repaginate Command' }
let splittedCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.split(': ')
let splittedCommand = UI.projects.education.spaces.docsSpace.commandInterface.command.split(': ')
if (splittedCommand[1] === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing Colon', 'Anchor Missing Colon')
return
}
let primaryCommand = splittedCommand[0]
@@ -410,27 +410,27 @@ function newSuperalgosDocsCommmandInterface() {
if (splittedPrimaryCommand[0].toLowerCase() === 'docs.repaginate') {
if (splittedPrimaryCommand[2] !== 'from') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing From', 'Anchor Missing From')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Missing From', 'Anchor Missing From')
return
}
if (splittedPrimaryCommand.length < 4) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Too Few Parameters', 'Anchor Too Few Parameters')
return
}
if (secondaryCommand === '') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
switch (splittedPrimaryCommand[1].toLowerCase()) {
case 'node': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
case 'concept': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
case 'topic': {
@@ -446,11 +446,11 @@ function newSuperalgosDocsCommmandInterface() {
return
}
case 'book': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
default: {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Category Not Valid', 'Anchor Category Not Valid')
return
}
}
@@ -458,30 +458,30 @@ function newSuperalgosDocsCommmandInterface() {
}
function checkUReIndexCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.reindex') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Reindex Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.reindex') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Reindex Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Reindex') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.reindex') !== 0) { return 'Not Reindex Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Reindex') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.reindex') !== 0) { return 'Not Reindex Command' }
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Reindexing Started')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Reindexing Started')
setTimeout(startReindexingProcess, 100)
function startReindexingProcess() {
UI.projects.superalgos.spaces.docsSpace.searchEngine.setUpSearchEngine(onFinish)
UI.projects.education.spaces.docsSpace.searchEngine.setUpSearchEngine(onFinish)
function onFinish() {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Reindexing Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Reindexing Done')
}
}
}
function checkUSaveCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.save') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Save Command')
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.save') {
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Save Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Save') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.save') !== 0) { return 'Not Save Command' }
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('Docs.Save') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('docs.save') !== 0) { return 'Not Save Command' }
let requestsSent = 0
let responseCount = 0
@@ -525,10 +525,10 @@ function newSuperalgosDocsCommmandInterface() {
if (responseCount === requestsSent) {
if (responseCount === okResponses) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Saving Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Saving Done')
afterSaving()
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Changes Not Saved', 'Anchor Changes Not Saved')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Changes Not Saved', 'Anchor Changes Not Saved')
}
}
}
@@ -637,18 +637,18 @@ function newSuperalgosDocsCommmandInterface() {
function repaginate(project, category, query) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
let orderedArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
project,
category,
query
)
if (orderedArray.length === 0) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'No Matching Topic, Tutorial or Review Found')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'No Matching Topic, Tutorial or Review Found')
return
}
@@ -659,7 +659,7 @@ function newSuperalgosDocsCommmandInterface() {
pageNumber++
schemaDocument.updated = true
}
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Repagination Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Repagination Done')
}
function addNode(project, type) {
@@ -670,23 +670,23 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsNodeSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Node', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Node', type)
}
function addConcept(project, type) {
@@ -697,30 +697,30 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsConceptSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Concept', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Concept', type)
}
function addTopic(project, topic, type, pageNumber) {
if (pageNumber === undefined) {
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
let orderedArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
project,
'Topic',
topic
@@ -738,29 +738,29 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsTopicSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Topic', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Topic', type)
}
function addTutorial(project, tutorial, type, pageNumber) {
if (pageNumber === undefined) {
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
let orderedArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
project,
'Tutorial',
tutorial
@@ -778,29 +778,29 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsTutorialSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Tutorial', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Tutorial', type)
}
function addReview(project, review, type, pageNumber) {
if (pageNumber === undefined) {
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
let orderedArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
project,
'Review',
review
@@ -818,23 +818,23 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsReviewSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsReviewSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsReviewSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Review', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Review', type)
}
function addBook(project, type) {
@@ -845,76 +845,76 @@ function newSuperalgosDocsCommmandInterface() {
paragraphs: [
{
style: "Text",
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
]
}
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(type)
if (exist !== undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Already Exists', 'Anchor Page Already Exists')
return
}
SCHEMAS_BY_PROJECT.get(project).array.docsBookSchema.push(template)
SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.set(type, template)
UI.projects.superalgos.spaces.docsSpace.navigateTo(project, 'Book', type)
UI.projects.education.spaces.docsSpace.navigateTo(project, 'Book', type)
}
function deleteNode(project, type) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
}
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
function deleteConcept(project, type) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
}
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
function deleteTopic(project, topic, type, pageNumber) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
} else {
if (exist.pageNumber !== pageNumber) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
return
}
if (exist.topic !== topic) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Topic Mismatch', 'Anchor Topic Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Topic Mismatch', 'Anchor Topic Mismatch')
return
}
}
@@ -922,25 +922,25 @@ function newSuperalgosDocsCommmandInterface() {
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
function deleteTutorial(project, tutorial, type, pageNumber) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
} else {
if (exist.pageNumber !== pageNumber) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
return
}
if (exist.tutorial !== tutorial) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Tutorial Mismatch', 'Anchor Tutorial Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Tutorial Mismatch', 'Anchor Tutorial Mismatch')
return
}
}
@@ -948,25 +948,25 @@ function newSuperalgosDocsCommmandInterface() {
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
function deleteReview(project, review, type, pageNumber) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsReviewSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
} else {
if (exist.pageNumber !== pageNumber) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Number Mismatch', 'Anchor Page Number Mismatch')
return
}
if (exist.review !== review) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Review Mismatch', 'Anchor Review Mismatch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Review Mismatch', 'Anchor Review Mismatch')
return
}
}
@@ -974,24 +974,24 @@ function newSuperalgosDocsCommmandInterface() {
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsReviewSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
function deleteBook(project, type) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let exist = SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(type)
if (exist === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error - Page Does Not Exist', 'Anchor Page Does Not Exist')
return
}
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(type)
schemaDocument.deleted = true
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message - Deleting Done')
}
}
}
@@ -58,7 +58,7 @@ function newSuperalgosDocsContextMenu() {
showHTMLTextArea()
function showHTMLTextArea() {
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph === undefined) { return }
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph === undefined) { return }
/*
When in editing mode, some type of paragraphs need to extend
@@ -67,196 +67,196 @@ function newSuperalgosDocsContextMenu() {
add an extra style class.
*/
let extraClassName = ''
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('definition') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('definition') >= 0) {
extraClassName = ' ' + ''
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('title') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('title') >= 0) {
extraClassName = ' ' + 'docs-h3'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('subtitle') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('subtitle') >= 0) {
extraClassName = ' ' + 'docs-h4'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('note') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('note') >= 0) {
extraClassName = ' ' + 'docs-alert-note'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('success') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('success') >= 0) {
extraClassName = ' ' + 'docs-alert-success'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('important') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('important') >= 0) {
extraClassName = ' ' + 'docs-alert-important'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('warning') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('warning') >= 0) {
extraClassName = ' ' + 'docs-alert-warning'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('error') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('error') >= 0) {
extraClassName = ' ' + 'docs-alert-error'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('javascript') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('javascript') >= 0) {
extraClassName = ' ' + 'language-javascript'
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('json') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('json') >= 0) {
extraClassName = ' ' + 'language-json'
}
UI.projects.superalgos.spaces.docsSpace.textArea = document.createElement('textarea');
UI.projects.superalgos.spaces.docsSpace.textArea.id = "UI.projects.superalgos.spaces.docsSpace.textArea";
UI.projects.superalgos.spaces.docsSpace.textArea.spellcheck = false;
UI.projects.superalgos.spaces.docsSpace.textArea.className = "docs-text-area" + extraClassName
UI.projects.superalgos.spaces.docsSpace.textArea.style.height = selectedParagraphHeight
UI.projects.superalgos.spaces.docsSpace.textArea.value = selectedParagraphData
UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.innerHTML = ""
UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.appendChild(UI.projects.superalgos.spaces.docsSpace.textArea)
UI.projects.superalgos.spaces.docsSpace.textArea.style.display = 'block'
UI.projects.superalgos.spaces.docsSpace.textArea.focus()
UI.projects.education.spaces.docsSpace.textArea = document.createElement('textarea');
UI.projects.education.spaces.docsSpace.textArea.id = "UI.projects.education.spaces.docsSpace.textArea";
UI.projects.education.spaces.docsSpace.textArea.spellcheck = false;
UI.projects.education.spaces.docsSpace.textArea.className = "docs-text-area" + extraClassName
UI.projects.education.spaces.docsSpace.textArea.style.height = selectedParagraphHeight
UI.projects.education.spaces.docsSpace.textArea.value = selectedParagraphData
UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.innerHTML = ""
UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.appendChild(UI.projects.education.spaces.docsSpace.textArea)
UI.projects.education.spaces.docsSpace.textArea.style.display = 'block'
UI.projects.education.spaces.docsSpace.textArea.focus()
removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.enterEditMode()
UI.projects.education.spaces.docsSpace.enterEditMode()
}
}
function deleteParagraph() {
if (selectedParagraphIndex === undefined) { return }
if (selectedParagraphIndex === 0) { return }
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.paragraphs.splice(selectedParagraphIndex, 1)
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.paragraphs.splice(selectedParagraphIndex, 1)
removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.render()
}
function toJavascript() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Javascript')
}
function toJson() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Json')
}
function toText() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Text')
}
function toTitle() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Title')
}
function toSubtitle() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Subtitle')
}
function toNote() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Note')
}
function toWarning() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Warning')
}
function toError() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Error')
}
function toImportant() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Important')
}
function toSuccess() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Success')
}
function toCallout() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Callout')
}
function toSummary() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Summary')
}
function toSection() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Section')
}
function toList() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'List')
}
function toTable() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Table')
}
function toHierarchy() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Hierarchy')
}
function toGif() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Gif')
}
function toPng() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Png')
}
function toAnchor() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Anchor')
}
function toBlock() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Block')
}
function toInclude() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Include')
}
function toPlaceholder() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Placeholder')
}
function toChapter() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Chapter')
}
function toWebPageLink() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Link')
}
function toYouTubeVideo() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
replaceStyle(docSchemaParagraph, 'Youtube')
}
function copyLink() {
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
let clipboard
switch (docSchemaParagraph.style) {
case 'Anchor': {
clipboard = "docs.goto " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type + '->' + docSchemaParagraph.text
clipboard = "docs.goto " + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type + '->' + docSchemaParagraph.text
break
}
case 'Block': {
clipboard = UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type + '->' + docSchemaParagraph.text
clipboard = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type + '->' + docSchemaParagraph.text
break
}
default: {
@@ -271,10 +271,10 @@ function newSuperalgosDocsContextMenu() {
function replaceStyle(docSchemaParagraph, style) {
if (docSchemaParagraph.style !== style) {
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
docSchemaParagraph.style = style
removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
UI.projects.education.spaces.docsSpace.documentPage.render()
}
}
}
@@ -313,7 +313,7 @@ function newSuperalgosDocsContextMenu() {
/*
Get the dimenssions of the current paragraph to help us to define the dimenssions of the text area.
*/
UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph = paragraphNode
UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph = paragraphNode
selectedParagraphHeight = paragraphNode.getClientRects()[0].height
if (selectedParagraphHeight < 30) { selectedParagraphHeight = 30 }
/*
@@ -393,19 +393,19 @@ function newSuperalgosDocsContextMenu() {
return true
}
if (paragraphNode.id.indexOf('-table') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseTable(paragraphNode)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseTable(paragraphNode)
return true
}
if (paragraphNode.id.indexOf('-hierarchy') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseHierarchy(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseHierarchy(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-gif') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseGIF(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseGIF(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-png') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParsePNG(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParsePNG(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-javascript') >= 0) {
@@ -449,11 +449,11 @@ function newSuperalgosDocsContextMenu() {
return true
}
if (paragraphNode.id.indexOf('-link') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseLink(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseLink(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-youtube') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseYoutube(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseYoutube(paragraphNode.innerHTML)
return true
}
}
@@ -1,4 +1,4 @@
function newSuperalgosDocSpace() {
function newEducationDocSpace() {
const MODULE_NAME = 'Doc Space'
let thisObject = {
isVisible: undefined,
@@ -88,10 +88,10 @@ function newSuperalgosDocSpace() {
Getting the used preferred languague
*/
if (window.localStorage.getItem('Current Branch') !== null && window.localStorage.getItem('Current Branch') !== undefined && window.localStorage.getItem('Current Branch') !== 'undefined') {
UI.projects.superalgos.spaces.docsSpace.currentBranch = window.localStorage.getItem('Current Branch')
UI.projects.education.spaces.docsSpace.currentBranch = window.localStorage.getItem('Current Branch')
} else {
window.localStorage.setItem('Current Branch', UI.projects.superalgos.globals.docs.DEFAULT_CURRENT_BRANCH)
UI.projects.superalgos.spaces.docsSpace.currentBranch = UI.projects.superalgos.globals.docs.DEFAULT_CURRENT_BRANCH
window.localStorage.setItem('Current Branch', UI.projects.education.globals.docs.DEFAULT_CURRENT_BRANCH)
UI.projects.education.spaces.docsSpace.currentBranch = UI.projects.education.globals.docs.DEFAULT_CURRENT_BRANCH
}
}
@@ -100,10 +100,10 @@ function newSuperalgosDocSpace() {
Getting the used preferred languague
*/
if (window.localStorage.getItem('Contributions Branch') !== null && window.localStorage.getItem('Contributions Branch') !== undefined && window.localStorage.getItem('Contributions Branch') !== 'undefined') {
UI.projects.superalgos.spaces.docsSpace.contributionsBranch = window.localStorage.getItem('Contributions Branch')
UI.projects.education.spaces.docsSpace.contributionsBranch = window.localStorage.getItem('Contributions Branch')
} else {
window.localStorage.setItem('Contributions Branch', UI.projects.superalgos.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH)
UI.projects.superalgos.spaces.docsSpace.contributionsBranch = UI.projects.superalgos.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH
window.localStorage.setItem('Contributions Branch', UI.projects.education.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH)
UI.projects.education.spaces.docsSpace.contributionsBranch = UI.projects.education.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH
}
}
@@ -112,10 +112,10 @@ function newSuperalgosDocSpace() {
Getting the used preferred languague
*/
if (window.localStorage.getItem('Docs Language') !== null && window.localStorage.getItem('Docs Language') !== undefined && window.localStorage.getItem('Docs Language') !== 'undefined') {
UI.projects.superalgos.spaces.docsSpace.language = window.localStorage.getItem('Docs Language')
UI.projects.education.spaces.docsSpace.language = window.localStorage.getItem('Docs Language')
} else {
window.localStorage.setItem('Docs Language', UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE)
UI.projects.superalgos.spaces.docsSpace.language = UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE
window.localStorage.setItem('Docs Language', UI.projects.education.globals.docs.DEFAULT_LANGUAGE)
UI.projects.education.spaces.docsSpace.language = UI.projects.education.globals.docs.DEFAULT_LANGUAGE
}
}
@@ -187,17 +187,17 @@ function newSuperalgosDocSpace() {
function changeCurrentBranch(branch) {
httpRequest(undefined, 'App/Checkout/' + branch, onResponse)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Changing Current Branch')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Changing Current Branch')
function onResponse(err, data) {
/* Lets check the result of the call through the http interface */
data = JSON.parse(data)
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
UI.projects.superalgos.spaces.docsSpace.currentBranch = branch
UI.projects.education.spaces.docsSpace.currentBranch = branch
window.localStorage.setItem('Current Branch', branch)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Current Branch Changed')
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Current Branch Changed')
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,
data.docs.category,
data.docs.type,
@@ -210,20 +210,20 @@ function newSuperalgosDocSpace() {
}
function changeContributionsBranch(branch) {
UI.projects.superalgos.spaces.docsSpace.contributionsBranch = branch
window.localStorage.setItem('Contributions Branch', UI.projects.superalgos.spaces.docsSpace.contributionsBranch)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Contributions Branch Changed')
UI.projects.education.spaces.docsSpace.contributionsBranch = branch
window.localStorage.setItem('Contributions Branch', UI.projects.education.spaces.docsSpace.contributionsBranch)
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Switching Branches - Contributions Branch Changed')
}
function changeLanguage(pLanguage) {
UI.projects.superalgos.spaces.docsSpace.language = pLanguage
window.localStorage.setItem('Docs Language', UI.projects.superalgos.spaces.docsSpace.language)
let languageLabel = UI.projects.superalgos.utilities.languages.getLaguageLabel(UI.projects.superalgos.spaces.docsSpace.language)
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs In ' + languageLabel)
UI.projects.education.spaces.docsSpace.language = pLanguage
window.localStorage.setItem('Docs Language', UI.projects.education.spaces.docsSpace.language)
let languageLabel = UI.projects.education.utilities.languages.getLaguageLabel(UI.projects.education.spaces.docsSpace.language)
UI.projects.education.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs In ' + languageLabel)
}
function sharePage() {
let clipboard = "docs.goto " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type
let clipboard = "docs.goto " + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type
UI.projects.superalgos.utilities.clipboard.copyTextToClipboard(clipboard)
}
@@ -235,7 +235,7 @@ function newSuperalgosDocSpace() {
would like to close the editor. ESC key exits edit mode.
*/
if (event.key === 'Escape') {
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
UI.projects.education.spaces.docsSpace.exitEditMode()
}
}
@@ -249,24 +249,24 @@ function newSuperalgosDocSpace() {
function exitEditMode() {
if (EDITOR_ON_FOCUS === true) {
thisObject.documentPage.exitEditMode()
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
UI.projects.education.spaces.docsSpace.documentPage.render()
EDITOR_ON_FOCUS = false
}
}
function onOpening() {
thisObject.isVisible = true
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered === undefined) {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered === undefined) {
thisObject.mainSearchPage.render()
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category,
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type,
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor,
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId,
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.placeholder
UI.projects.education.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category,
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type,
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.anchor,
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId,
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.placeholder
)
}
}
@@ -293,25 +293,25 @@ function newSuperalgosDocSpace() {
}
function searchPage() {
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = undefined
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered = undefined
thisObject.mainSearchPage.render()
}
function navigateTo(project, category, type, anchor, nodeId, placeholder) {
EDITOR_ON_FOCUS = false // forced exit
UI.projects.superalgos.spaces.docsSpace.paragraphMap = new Map()
UI.projects.education.spaces.docsSpace.paragraphMap = new Map()
getReadyToNavigate(project, category, type, anchor, nodeId, placeholder)
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
UI.projects.education.spaces.docsSpace.documentPage.render()
/*
Here we will check if we need to position the page at a particular anchor or at the top.
*/
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor !== undefined) {
scrollToElement('docs-anchor-' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor.toLowerCase().replaceAll(' ', '-'))
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.anchor = undefined
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.anchor !== undefined) {
scrollToElement('docs-anchor-' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.anchor.toLowerCase().replaceAll(' ', '-'))
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.anchor = undefined
} else {
scrollToElement('docs-space-div')
}
@@ -319,12 +319,12 @@ function newSuperalgosDocSpace() {
function getReadyToNavigate(project, category, type, anchor, nodeId, placeholder) {
/* Replace the current object with this */
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered = JSON.parse(JSON.stringify(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered))
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered = JSON.parse(JSON.stringify(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered))
}
if (category === 'Book') {
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = {
UI.projects.education.spaces.docsSpace.currentBookBeingRendered = {
project: project,
category: category,
type: type.replace('AMPERSAND', '\''),
@@ -334,7 +334,7 @@ function newSuperalgosDocSpace() {
}
}
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = {
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered = {
project: project,
category: category,
type: type.replace('AMPERSAND', '\''),
@@ -345,7 +345,7 @@ function newSuperalgosDocSpace() {
}
function resize() {
thisObject.container.frame.width = UI.projects.superalgos.globals.docs.DOCS_SPACE_WIDTH
thisObject.container.frame.width = UI.projects.education.globals.docs.DOCS_SPACE_WIDTH
thisObject.container.frame.height = browserCanvas.height // - TOP_SPACE_HEIGHT
thisObject.container.frame.position.x = browserCanvas.width
thisObject.container.frame.position.y = 0 // TOP_SPACE_HEIGHT
@@ -22,7 +22,7 @@ function newSuperalgosDocsDocumentPage() {
function render() {
appSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.appSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
appSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.appSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
disableCollapsibleContent()
getSchemaDocument()
@@ -32,33 +32,33 @@ function newSuperalgosDocsDocumentPage() {
enableCollapsibleContent()
function getSchemaDocument() {
switch (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category) {
switch (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category) {
case 'Node': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsNodeSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsNodeSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
case 'Concept': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsConceptSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsConceptSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
case 'Topic': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsTopicSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsTopicSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
case 'Tutorial': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsTutorialSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsTutorialSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
case 'Review': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsReviewSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsReviewSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
case 'Workspace': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.workspaceSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.workspaceSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId)
break
}
case 'Book': {
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsBookSchema.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
thisObject.docsSchemaDocument = SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsBookSchema.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
break
}
}
@@ -67,8 +67,8 @@ function newSuperalgosDocsDocumentPage() {
// Use the New Node Template
let template = {
updated: true,
type: UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type,
definition: { text: "Write the definition for this " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + "." },
type: UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type,
definition: { text: "Write the definition for this " + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category + "." },
paragraphs: [
{
style: "Text",
@@ -77,20 +77,20 @@ function newSuperalgosDocsDocumentPage() {
]
}
switch (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category) {
switch (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category) {
case 'Node': {
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsNodeSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsNodeSchema.set(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type, template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsNodeSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsNodeSchema.set(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type, template)
break
}
case 'Concept': {
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsConceptSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsConceptSchema.set(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type, template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsConceptSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsConceptSchema.set(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type, template)
break
}
case 'Book': {
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsBookSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsBookSchema.set(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type, template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsBookSchema.push(template)
SCHEMAS_BY_PROJECT.get(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project).map.docsBookSchema.set(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type, template)
break
}
}
@@ -105,7 +105,7 @@ function newSuperalgosDocsDocumentPage() {
if (thisObject.docsSchemaDocument.paragraphs.length === 0) {
let paragraph = {
style: 'Text',
text: UI.projects.superalgos.globals.docs.NEW_PARAGRAPH_TEXT
text: UI.projects.education.globals.docs.NEW_PARAGRAPH_TEXT
}
thisObject.docsSchemaDocument.paragraphs.push(paragraph)
}
@@ -113,11 +113,11 @@ function newSuperalgosDocsDocumentPage() {
async function repositionWorkspace() {
let node
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Workspace') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Workspace') {
node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(thisObject.docsSchemaDocument.nodeId)
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== undefined) {
node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId)
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== undefined) {
node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId)
}
if (node === undefined) { return }
@@ -125,7 +125,7 @@ function newSuperalgosDocsDocumentPage() {
setTimeout(positionAtNode, 0000, node)
setTimeout(positionAtNode, 1000, node) // In case the branch which contains the node is collapsed.
function positionAtNode(node) {
let xOffset = -UI.projects.superalgos.globals.docs.DOCS_SPACE_WIDTH / 2
let xOffset = -UI.projects.education.globals.docs.DOCS_SPACE_WIDTH / 2
UI.projects.superalgos.spaces.floatingSpace.positionAtNode(node, xOffset)
}
}
@@ -139,7 +139,7 @@ function newSuperalgosDocsDocumentPage() {
let HTML = ''
HTML = HTML + '<section id="docs-search-results-div" class="docs-search-page-container">'
HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + '</section>'
HTML = HTML + '<div id="docs-common-style-container-div" class="docs-common-style-container">' // Common Style Container Starts
@@ -147,7 +147,7 @@ function newSuperalgosDocsDocumentPage() {
/* Title */
let titleLabel = thisObject.docsSchemaDocument.type
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 + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
if (thisObject.docsSchemaDocument.deleted === true) {
let key = 'auto-generated-flag-paragraph'
@@ -167,7 +167,7 @@ function newSuperalgosDocsDocumentPage() {
}
}
addDefinitionTable(thisObject.docsSchemaDocument, 'definition-editable-', UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
addDefinitionTable(thisObject.docsSchemaDocument, 'definition-editable-', UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
let editableParagraphIndex = 0
let autoGeneratedParagraphIndex = 0
@@ -184,10 +184,10 @@ function newSuperalgosDocsDocumentPage() {
Here we inject the HTML we built into the DOM at the Docs Space Div.
*/
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
hightlightEmbeddedCode()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
/*
After generating the html, we will add the images at all the points we know
@@ -196,10 +196,10 @@ function newSuperalgosDocsDocumentPage() {
addImages()
function generateNavigationAndTableOfContents() {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTopicPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
thisObject.docsSchemaDocument.topic
)
@@ -207,7 +207,7 @@ function newSuperalgosDocsDocumentPage() {
/* Topic Title
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>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateTopicPreviousAndNextPageNavigation()
@@ -223,17 +223,17 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '</div>' // END Container for Topic Navigation
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTutorialPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
thisObject.docsSchemaDocument.tutorial
)
/* Tutorial Title
titleLabel = thisObject.docsSchemaDocument.tutorial + ' Tutorial 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>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateTutorialPreviousAndNextPageNavigation()
@@ -249,17 +249,17 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '</div>' // END Container for Tutorial Navigation
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Review') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Review') {
orderedReviewPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedReviewPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Review',
thisObject.docsSchemaDocument.review
)
/* Review Title
titleLabel = thisObject.docsSchemaDocument.review + ' Review 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>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateReviewPreviousAndNextPageNavigation()
@@ -283,8 +283,8 @@ function newSuperalgosDocsDocumentPage() {
}
}
let definitionText = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
definitionText = definitionText + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(docsSchemaDocument.definition)
let definitionText = UI.projects.education.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
definitionText = definitionText + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(docsSchemaDocument.definition)
/* We will test if we can draw an image here or not*/
let testElement
@@ -300,7 +300,7 @@ function newSuperalgosDocsDocumentPage() {
image we use a table, otherwise we will render the definitaion as a Summary.
*/
if ((category === 'Topic' || category === 'Tutorial' || category === 'Review' || category === 'Concept' || category === 'Book') && testElement === undefined) {
HTML = HTML + '<div id="definition-summary-editable-paragraph" class="docs-summary"><b>Summary:</b> ' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</div>'
HTML = HTML + '<div id="definition-summary-editable-paragraph" class="docs-summary"><b>Summary:</b> ' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</div>'
} else {
HTML = HTML + '<div class="docs-definition-table">'
@@ -314,7 +314,7 @@ function newSuperalgosDocsDocumentPage() {
definitionImagesArray.push(imageItem)
HTML = HTML + '<div id="' + imageItem.div + '" class="docs-image-container"></div>'
HTML = HTML + '<div id="' + idPrefix + 'paragraph" class="docs-definition-text"><strong>' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</strong></div>'
HTML = HTML + '<div id="' + idPrefix + 'paragraph" class="docs-definition-text"><strong>' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</strong></div>'
HTML = HTML + '</div>'
}
@@ -333,11 +333,11 @@ function newSuperalgosDocsDocumentPage() {
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> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
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> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -361,7 +361,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
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>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -379,11 +379,11 @@ function newSuperalgosDocsDocumentPage() {
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 + '\', \'' + 'Tutorial' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
HTML = HTML + '</div><div>'
if (nextPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -407,7 +407,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -424,11 +424,11 @@ function newSuperalgosDocsDocumentPage() {
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 + '\', \'' + 'Review' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
HTML = HTML + '</div><div>'
if (nextPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -452,7 +452,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -516,7 +516,7 @@ function newSuperalgosDocsDocumentPage() {
}
}
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
autoGeneratedHtml()
}
HTML = HTML + '</div>' // Content Ends
@@ -615,8 +615,8 @@ function newSuperalgosDocsDocumentPage() {
}
function addPlaceholdedParagraph(propertyName) {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.placeholder !== undefined) {
let placeholder = UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.placeholder[propertyName]
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.placeholder !== undefined) {
let placeholder = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.placeholder[propertyName]
if (placeholder !== undefined) {
let paragraph = {
@@ -657,8 +657,8 @@ function newSuperalgosDocsDocumentPage() {
switch (category) {
case 'Topic': {
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTopicPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
chapterName
)
@@ -669,8 +669,8 @@ function newSuperalgosDocsDocumentPage() {
break
}
case 'Tutorial': {
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTutorialPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
chapterName
)
@@ -681,8 +681,8 @@ function newSuperalgosDocsDocumentPage() {
break
}
case 'Review': {
orderedReviewPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedReviewPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Review',
chapterName
)
@@ -745,7 +745,7 @@ function newSuperalgosDocsDocumentPage() {
addDefinitionImage()
addHierarchyImages()
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
addMenuItemsImages()
addChildrenNodesPropertiesImages()
addAttachingAndReferencingRulesImages()
@@ -841,8 +841,8 @@ function newSuperalgosDocsDocumentPage() {
}
function addProjectImage() {
let imageName = UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project.toLowerCase().replaceAll(' ', '-')
let imageElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, imageName)
let imageName = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project.toLowerCase().replaceAll(' ', '-')
let imageElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, imageName)
imageElement.width = "50"
imageElement.height = "50"
@@ -868,10 +868,10 @@ function newSuperalgosDocsDocumentPage() {
function getIcon() {
if (menuItem.relatedUiObject !== undefined) {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.relatedUiObject)
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.relatedUiObject)
} else {
if (menuItem.iconPathOn !== undefined) {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.iconPathOn)
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.iconPathOn)
} else {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName('Superalgos', 'bitcoin')
}
@@ -900,7 +900,7 @@ function newSuperalgosDocsDocumentPage() {
if (childrenNodesProperty.project !== undefined) {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(childrenNodesProperty.project, childrenNodesProperty.childType)
} else {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, childrenNodesProperty.childType)
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, childrenNodesProperty.childType)
}
}
}
@@ -948,7 +948,7 @@ function newSuperalgosDocsDocumentPage() {
function getIcon() {
let splittedListItem = listItem.split('|')
if (splittedListItem.length === 1) {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, listItem)
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, listItem)
} else {
let project = splittedListItem[0]
let nodeType = splittedListItem[1]
@@ -1075,7 +1075,7 @@ function newSuperalgosDocsDocumentPage() {
let name = UI.projects.superalgos.utilities.strings.fromCamelCaseToUpperWithSpaces(childrenNodesProperty.name)
HTML = HTML + '<button id="docs-children-nodes-property-' + i + '" type="button" class="docs-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(name, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-children-nodes-property-' + i + '" type="button" class="docs-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(name, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<div class="docs-collapsible-content">'
paragraph = {
@@ -1148,7 +1148,7 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < nodeList.length; i++) {
let listItem = nodeList[i]
if (listItem === "") { continue }
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(listItem, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(listItem, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
}
}
}
@@ -1203,7 +1203,7 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < nodeList.length; i++) {
let listItem = nodeList[i]
if (listItem === "") { continue }
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(listItem, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(listItem, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
}
}
}
@@ -1514,13 +1514,13 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-text'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addCodeToWhiteList(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Title': {
@@ -1528,8 +1528,8 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-title'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Subtitle': {
@@ -1537,8 +1537,8 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-subtitle'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Note': {
@@ -1546,11 +1546,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-note-circle"></i> <b>Note:</b>'
role = 'role="alert"'
key = key + '-note'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Success': {
@@ -1558,11 +1558,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-check-square-o"></i> <b>Tip:</b>'
role = 'role="alert"'
key = key + '-success'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Important': {
@@ -1570,11 +1570,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Important:</b>'
role = 'role="alert"'
key = key + '-important'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Warning': {
@@ -1582,11 +1582,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Warning:</b>'
role = 'role="alert"'
key = key + '-warning'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Error': {
@@ -1594,9 +1594,9 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Error:</b>'
role = 'role="alert"'
key = key + '-error'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Callout': {
@@ -1604,11 +1604,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-callout'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Summary': {
@@ -1616,11 +1616,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<b>Summary:</b>'
role = ''
key = key + '-summary'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Section': {
@@ -1628,9 +1628,9 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-section'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'List': {
@@ -1639,25 +1639,25 @@ function newSuperalgosDocsDocumentPage() {
sufix = '</li></ul>'
role = ''
key = key + '-list'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addBold(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addBold(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Table': {
styleClass = ''
prefix = '<table class="docs-info-table">'
sufix = '</table>' + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
sufix = '</table>' + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
role = ''
key = key + '-table'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = UI.projects.superalgos.utilities.docs.parseTable(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = UI.projects.education.utilities.docs.parseTable(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
break
}
case 'Hierarchy': {
@@ -1675,7 +1675,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-link'
innerHTML = UI.projects.superalgos.utilities.docs.parseLink(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseLink(paragraph.text)
break
}
case 'Youtube': {
@@ -1684,7 +1684,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-youtube'
innerHTML = UI.projects.superalgos.utilities.docs.parseYoutube(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseYoutube(paragraph.text)
break
}
case 'Gif': {
@@ -1693,7 +1693,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-gif'
innerHTML = UI.projects.superalgos.utilities.docs.parseGIF(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseGIF(paragraph.text)
break
}
case 'Png': {
@@ -1702,7 +1702,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-png'
innerHTML = UI.projects.superalgos.utilities.docs.parsePNG(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parsePNG(paragraph.text)
break
}
case 'Javascript': {
@@ -1767,7 +1767,7 @@ function newSuperalgosDocsDocumentPage() {
}
HTML = HTML + '<p><div id="' + key + '" ' + styleClass + ' ' + role + '>' + prefix + ' ' + innerHTML + sufix + '</div></p>'
UI.projects.superalgos.spaces.docsSpace.paragraphMap.set(key, paragraph)
UI.projects.education.spaces.docsSpace.paragraphMap.set(key, paragraph)
}
function hightlightEmbeddedCode() {
@@ -1827,7 +1827,7 @@ function newSuperalgosDocsDocumentPage() {
let imageContainer = '<div id="' + imageItem.div + '" class="docs-hierarchy-image-container"/>'
hierarchyImagesArray.push(imageItem)
let matrixValue = '<table><tr><td class="docs-hierarchy-table-cell">' + imageContainer + '</td></tr><tr><td class="docs-hierarchy-table-cell">' + UI.projects.superalgos.utilities.docs.addToolTips(schemaDocument.type, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</td></tr></table>'
let matrixValue = '<table><tr><td class="docs-hierarchy-table-cell">' + imageContainer + '</td></tr><tr><td class="docs-hierarchy-table-cell">' + UI.projects.education.utilities.docs.addToolTips(schemaDocument.type, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</td></tr></table>'
let matrixRow = contentMatrix[currentRow]
matrixRow[currentColumn] = matrixValue
@@ -1974,10 +1974,10 @@ function newSuperalgosDocsDocumentPage() {
contextMenuClickablDiv.addEventListener('contextmenu', e => {
e.preventDefault()
if (EDITOR_ON_FOCUS === true) {
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
UI.projects.education.spaces.docsSpace.exitEditMode()
return
}
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.getSelection() === false) {
if (UI.projects.education.spaces.docsSpace.contextMenu.getSelection() === false) {
/*
The click was in a place where we can not recognize an editable piece.
We will not open the menu in this circunstances.
@@ -1994,7 +1994,7 @@ function newSuperalgosDocsDocumentPage() {
outClick.addEventListener('click', () => {
if (EDITOR_ON_FOCUS !== true) {
UI.projects.superalgos.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
UI.projects.education.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
}
})
}
@@ -2027,7 +2027,7 @@ function newSuperalgosDocsDocumentPage() {
/* We will update the paragraph that was being edited*/
let editing
if (UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('definition') >= 0) {
if (UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.indexOf('definition') >= 0) {
editing = "Definition"
} else {
editing = "Paragraph"
@@ -2037,7 +2037,7 @@ function newSuperalgosDocsDocumentPage() {
/*
In this case we are at a regular paragraph.
*/
let docSchemaParagraph = UI.projects.superalgos.spaces.docsSpace.paragraphMap.get(UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id)
let docSchemaParagraph = UI.projects.education.spaces.docsSpace.paragraphMap.get(UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id)
/*
We will detect if the user has created new paragraphs while editing.
For that we will inspect the value of the text area looking for a char
@@ -2045,19 +2045,19 @@ function newSuperalgosDocsDocumentPage() {
*/
let paragraphs = []
let paragraph = ''
let splittedSelectedParagraph = UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph.id.split('-')
let splittedSelectedParagraph = UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph.id.split('-')
let selectededitableParagraphIndex = Number(splittedSelectedParagraph[2])
let selectedParagraphStyle = splittedSelectedParagraph[3]
let style = selectedParagraphStyle.charAt(0).toUpperCase() + selectedParagraphStyle.slice(1);
for (let i = 0; i < UI.projects.superalgos.spaces.docsSpace.textArea.value.length; i++) {
if (UI.projects.superalgos.spaces.docsSpace.textArea.value.charCodeAt(i) === 10 && style !== 'Javascript' && style !== 'Json' && style !== 'Table') {
for (let i = 0; i < UI.projects.education.spaces.docsSpace.textArea.value.length; i++) {
if (UI.projects.education.spaces.docsSpace.textArea.value.charCodeAt(i) === 10 && style !== 'Javascript' && style !== 'Json' && style !== 'Table') {
if (paragraph !== '') {
paragraphs.push(paragraph)
}
paragraph = ''
} else {
paragraph = paragraph + UI.projects.superalgos.spaces.docsSpace.textArea.value[i]
paragraph = paragraph + UI.projects.education.spaces.docsSpace.textArea.value[i]
}
}
paragraphs.push(paragraph)
@@ -2065,13 +2065,13 @@ function newSuperalgosDocsDocumentPage() {
if (paragraphs.length === 1) {
/* There is no need to add new paragraphs, we just update the one we have. */
if (paragraphs[0] !== '') {
UI.projects.superalgos.utilities.docs.setTextBasedOnLanguage(docSchemaParagraph, paragraphs[0])
UI.projects.education.utilities.docs.setTextBasedOnLanguage(docSchemaParagraph, paragraphs[0])
} else {
/*
Deleting paragarphs is only possible in the default language.
*/
if (UI.projects.superalgos.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
if (UI.projects.education.spaces.docsSpace.language === UI.projects.education.globals.docs.DEFAULT_LANGUAGE) {
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
thisObject.docsSchemaDocument.paragraphs.splice(selectededitableParagraphIndex, 1)
if (thisObject.docsSchemaDocument.paragraphs.length === 0) {
let newParagraph = {
@@ -2086,11 +2086,11 @@ function newSuperalgosDocsDocumentPage() {
/*
Adding paragarphs is only possible in the default language.
*/
if (UI.projects.superalgos.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
if (UI.projects.education.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
/*
We will update the one paragraph we have and we will add the rest.
*/
UI.projects.superalgos.utilities.docs.setTextBasedOnLanguage(docSchemaParagraph, paragraphs[0])
UI.projects.education.utilities.docs.setTextBasedOnLanguage(docSchemaParagraph, paragraphs[0])
for (let i = 1; i < paragraphs.length; i++) {
let newParagraph = {
@@ -2098,7 +2098,7 @@ function newSuperalgosDocsDocumentPage() {
text: paragraphs[i]
}
thisObject.docsSchemaDocument.paragraphs.splice(selectededitableParagraphIndex + i, 0, newParagraph)
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
}
}
}
@@ -2109,8 +2109,8 @@ function newSuperalgosDocsDocumentPage() {
/*
This means that the definition was being edited.
*/
if (UI.projects.superalgos.spaces.docsSpace.textArea.value !== '') {
UI.projects.superalgos.utilities.docs.setTextBasedOnLanguage(thisObject.docsSchemaDocument.definition, UI.projects.superalgos.spaces.docsSpace.textArea.value)
if (UI.projects.education.spaces.docsSpace.textArea.value !== '') {
UI.projects.education.utilities.docs.setTextBasedOnLanguage(thisObject.docsSchemaDocument.definition, UI.projects.education.spaces.docsSpace.textArea.value)
}
break
}
@@ -28,21 +28,21 @@ function newSuperalgosDocsFooter() {
HTML = HTML + '<div class="docs-footer-cell style="white-space: nowrap; overflow-x: auto;" >' // white-space: nowrap; overflow-x: auto; prevents line breaks when combined with display: inline-block;" in the child elements
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.sharePage()"><button>SHARE</button></span>'
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.sharePage()"><button>SHARE</button></span>'
}
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.scrollToElement(\'docs-space-div\')"><button>TO TOP</button></span>'
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>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.scrollToElement(\'docs-space-div\')"><button>TO TOP</button></span>'
if (UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered.project + '\', \'' + UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered.category + '\', \'' + UI.projects.education.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>'
if (UI.projects.education.spaces.docsSpace.currentBookBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.project + '\', \'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.category + '\', \'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.type + '\')"><button>TO BOOK</button></span>'
}
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Reviews' + '\')"><button>REVIEWS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Community Data Mines' + '\')"><button>DATA MINES</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'First Steps Tutorials' + '\')"><button>TUTORIALS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'User Manual' + '\')"><button>USER MANUAL</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Reviews' + '\')"><button>REVIEWS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Community Data Mines' + '\')"><button>DATA MINES</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'First Steps Tutorials' + '\')"><button>TUTORIALS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'User Manual' + '\')"><button>USER MANUAL</button></span>'
HTML = HTML + '</div>'
@@ -69,61 +69,61 @@ function newSuperalgosDocsFooter() {
HTML = HTML + 'We produce the original Docs in English and you get the content in your preferred language only when translations are available. When not, you get the default content, in English.'
HTML = HTML + '</div>'
let languageCode = UI.projects.superalgos.spaces.docsSpace.language
let languageCode = UI.projects.education.spaces.docsSpace.language
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Choose Your Language</h4>'
HTML = HTML + 'Click on your preferred language:<br/>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'EN\')"><img src="Images/Languages/EN.png" title="English" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'EN\')"><img src="Images/Languages/EN.png" title="English" class="docs-footer-language'
if (languageCode === 'EN') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'ES\')"><img src="Images/Languages/ES.png" title="Spanish" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'ES\')"><img src="Images/Languages/ES.png" title="Spanish" class="docs-footer-language'
if (languageCode === 'ES') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'RU\')"><img src="Images/Languages/RU.png" title="Russian" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'RU\')"><img src="Images/Languages/RU.png" title="Russian" class="docs-footer-language'
if (languageCode === 'RU') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'IT\')"><img src="Images/Languages/IT.png" title="Italian" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'IT\')"><img src="Images/Languages/IT.png" title="Italian" class="docs-footer-language'
if (languageCode === 'IT') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'DE\')"><img src="Images/Languages/DE.png" title="German" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'DE\')"><img src="Images/Languages/DE.png" title="German" class="docs-footer-language'
if (languageCode === 'DE') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'FR\')"><img src="Images/Languages/FR.png" title="French" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'FR\')"><img src="Images/Languages/FR.png" title="French" class="docs-footer-language'
if (languageCode === 'FR') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'CN\')"><img src="Images/Languages/CN.png" title="Simplified Chinese-Mandarin" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'CN\')"><img src="Images/Languages/CN.png" title="Simplified Chinese-Mandarin" class="docs-footer-language'
if (languageCode === 'CN') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'ID\')"><img src="Images/Languages/ID.png" title="Bahasa" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'ID\')"><img src="Images/Languages/ID.png" title="Bahasa" class="docs-footer-language'
if (languageCode === 'ID') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'TR\')"><img src="Images/Languages/TR.png" title="Turkish" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'TR\')"><img src="Images/Languages/TR.png" title="Turkish" class="docs-footer-language'
if (languageCode === 'TR') {
HTML = HTML + '-selected'
}
@@ -161,23 +161,23 @@ function newSuperalgosDocsFooter() {
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Choose the Current Branch</h4>'
HTML = HTML + 'You are currently running on the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.superalgos.spaces.docsSpace.currentBranch) + '</code> branch. Switch to:'
HTML = HTML + 'You are currently running on the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.education.spaces.docsSpace.currentBranch) + '</code> branch. Switch to:'
HTML = HTML + '<ul>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'master\')">Master</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'master\')">Master</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '</ul>'
HTML = HTML + '</div>'
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Contributions Branch</h4>'
HTML = HTML + 'You are currently contributing to the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.superalgos.spaces.docsSpace.contributionsBranch) + '</code> branch. Switch to:'
HTML = HTML + 'You are currently contributing to the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.education.spaces.docsSpace.contributionsBranch) + '</code> branch. Switch to:'
HTML = HTML + '<ul>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'master\')">Master</code></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'master\')">Master</code></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '</ul>'
HTML = HTML + '</ul>'
@@ -25,10 +25,10 @@ function newSuperalgosDocsMainSearchPage() {
HTML = HTML + '<center><div class="docs-font-normal docs-search-box"><input class="docs-search-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input></div></center>'
HTML = HTML + '</div>'
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
}
function addSearchHeader() {
@@ -46,17 +46,17 @@ function newSuperalgosDocsMainSearchPage() {
function detectEnterOnSearchBox() {
const element = document.getElementsByClassName("docs-search-input")[0]
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command !== undefined) {
element.value = UI.projects.superalgos.spaces.docsSpace.commandInterface.command
if (UI.projects.education.spaces.docsSpace.commandInterface.command !== undefined) {
element.value = UI.projects.education.spaces.docsSpace.commandInterface.command
}
element.addEventListener("keyup", function (event) {
if (event.key === "Enter" || event.keyCode === 13) {
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = undefined
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = undefined
UI.projects.superalgos.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.commandInterface.command = element.value.trim()
UI.projects.superalgos.spaces.docsSpace.commandInterface.detectCommands()
UI.projects.education.spaces.docsSpace.exitEditMode()
UI.projects.education.spaces.docsSpace.currentBookBeingRendered = undefined
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered = undefined
UI.projects.education.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
UI.projects.education.spaces.docsSpace.commandInterface.command = element.value.trim()
UI.projects.education.spaces.docsSpace.commandInterface.detectCommands()
}
});
}
@@ -23,12 +23,12 @@ function newSuperalgosDocsSearchResultsPage() {
buildHTML()
function buildResultsArray() {
for (let i = 0; i < UI.projects.superalgos.spaces.docsSpace.searchEngine.docsIndex.length; i++) {
let documentIndex = UI.projects.superalgos.spaces.docsSpace.searchEngine.docsIndex[i]
for (let i = 0; i < UI.projects.education.spaces.docsSpace.searchEngine.docsIndex.length; i++) {
let documentIndex = UI.projects.education.spaces.docsSpace.searchEngine.docsIndex[i]
let documentPoints = 0
for (const style in documentIndex.phraseCount) {
let key = UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase())
let key = UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase())
let thisPhraseCount = documentIndex.phraseCount[style].get(key)
if (thisPhraseCount === undefined) {
thisPhraseCount = 0
@@ -210,7 +210,7 @@ function newSuperalgosDocsSearchResultsPage() {
const tabs = ['All', 'Nodes', 'Concepts', 'Topics', 'Tutorials', 'Reviews', 'Books', 'Workspace']
let HTML = ''
HTML = HTML + '<section id="docs-search-results-div" class="docs-search-page-container">'
HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader()
// Tabs
HTML = HTML + '<div class="docs-search-results-header-tabs-container">'
@@ -251,7 +251,7 @@ function newSuperalgosDocsSearchResultsPage() {
let nodeType = pathStep[1]
let nodeProject = pathStep[2]
let nodeId = pathStep[3]
let link = ' > <a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + nodeProject + '\', \'' + result.documentIndex.category + '\', \'' + nodeType.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + nodeId + '\')" class="docs-search-result-content-record-project-category-link">'
let link = ' > <a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + nodeProject + '\', \'' + result.documentIndex.category + '\', \'' + nodeType.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + nodeId + '\')" class="docs-search-result-content-record-project-category-link">'
if (nodeName === 'New ' + nodeType || nodeName === 'My ' + nodeType || nodeName === undefined) {
nodeName = ''
}
@@ -289,10 +289,10 @@ function newSuperalgosDocsSearchResultsPage() {
mainLink = result.documentIndex.docsSchemaDocument.type
}
}
HTML = HTML + '<p><a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + result.documentIndex.project + '\', \'' + result.documentIndex.category + '\', \'' + result.documentIndex.docsSchemaDocument.type.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + result.documentIndex.docsSchemaDocument.nodeId + '\')" class="docs-search-result-content-record-title">' + mainLink + '</a></p>'
HTML = HTML + '<p><a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + result.documentIndex.project + '\', \'' + result.documentIndex.category + '\', \'' + result.documentIndex.docsSchemaDocument.type.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + result.documentIndex.docsSchemaDocument.nodeId + '\')" class="docs-search-result-content-record-title">' + mainLink + '</a></p>'
if (result.documentIndex.docsSchemaDocument.definition !== undefined) {
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '</p>'
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + UI.projects.education.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '</p>'
} else {
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + 'No definition available.' + '</p>'
}
@@ -320,10 +320,10 @@ function newSuperalgosDocsSearchResultsPage() {
}
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
}
}
}
@@ -1,4 +1,4 @@
function newSuperalgosTutorialSpace() {
function newEducationTutorialSpace() {
const MODULE_NAME = 'Tutorial Space'
let thisObject = {
stop: stop,
@@ -291,13 +291,13 @@ function newSuperalgosTutorialSpace() {
/*
This forces the tutorial to open the documentation panel.
*/
UI.projects.superalgos.spaces.docsSpace.sidePanelTab.open()
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
}
if (config.controlDocs.panel === "Close") {
/*
This forces the tutorial to close the documentation panel.
*/
UI.projects.superalgos.spaces.docsSpace.sidePanelTab.close()
UI.projects.education.spaces.docsSpace.sidePanelTab.close()
}
if (
config.controlDocs.page !== undefined &&
@@ -311,7 +311,7 @@ function newSuperalgosTutorialSpace() {
/*
This produces the Docs to laod the specified page.
*/
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(config.controlDocs.page.project, config.controlDocs.page.category, config.controlDocs.page.type, config.controlDocs.page.anchor)
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(config.controlDocs.page.project, config.controlDocs.page.category, config.controlDocs.page.type, config.controlDocs.page.anchor)
}
}
}
@@ -700,7 +700,7 @@ function newSuperalgosTutorialSpace() {
return
}
let position = nodeConfig.position
if (UI.projects.superalgos.spaces.docsSpace.isVisible === true) {
if (UI.projects.education.spaces.docsSpace.isVisible === true) {
position = 'Left'
}
@@ -1212,7 +1212,7 @@ function newSuperalgosTutorialSpace() {
}
newConfig = currentNode.config
newDocument = JSON.stringify(schemaDocument) + ' - ' + UI.projects.superalgos.spaces.docsSpace.language
newDocument = JSON.stringify(schemaDocument) + ' - ' + UI.projects.education.spaces.docsSpace.language
if (newConfig === currentConfig && newDocument === currentDocument) { return }
currentConfig = newConfig
@@ -1226,13 +1226,13 @@ function newSuperalgosTutorialSpace() {
if (nodeConfig.controlDocs !== undefined) {
if (nodeConfig.controlDocs.closeTutorialEditor !== true) {
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
UI.projects.education.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
}
if (nodeConfig.controlDocs.searchPage === true) {
UI.projects.superalgos.spaces.docsSpace.searchPage()
UI.projects.education.spaces.docsSpace.searchPage()
}
} else {
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
UI.projects.education.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
}
function syncConfigIconWithDocumentIcon() {
@@ -1318,11 +1318,11 @@ function newSuperalgosTutorialSpace() {
if (fullscreenMode === false) {
if (schemaDocument.definition.icon === undefined || schemaDocument.definition.icon.name === '') {
/* When there is no image, we will render a Summary instead of a Table */
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-summary">' + text + '</div>'
} else {
html = html + '<table class="tutorial-definitionTable">'
@@ -1336,11 +1336,11 @@ function newSuperalgosTutorialSpace() {
html = html + '</td>'
html = html + '<td>'
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<strong class="tutorial-font-bold-small">' + text + '</strong>'
html = html + '</td>'
@@ -1354,102 +1354,102 @@ function newSuperalgosTutorialSpace() {
let paragraph = schemaDocument.paragraphs[i]
switch (paragraph.style) {
case 'Summary': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-summary">' + text + '</div>'
break
}
case 'Title': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<h2 class="tutorial-font-medium">' + text + '</h2>'
break
}
case 'Gif': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<div id="tutorialGifDiv" width="200" width="290"/>'
newGifName = text
break
}
case 'Text': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small">' + text + '</div>'
break
}
case 'Json': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.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)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<pre><code class="language-javascript">' + text + '</code></pre>'
break
}
case 'List': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addBold(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addBold(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-list"><ul><li>' + text + '</li></ul></div>'
break
}
case 'Callout': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-bold-small tutorial-callout" > ' + text + '</div>'
break
}
case 'Link': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
let splittedText = text.split('->')
html = html + '<a class="tutorial-font-small tutorial-external-link" href="' + 'https://' + splittedText[1] + '" target="_blank">' + splittedText[0] + '</a>'
break
}
case 'Note': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-info" role="alert"><i class="tutorial-fa tutorial-info-circle"></i> <b>Note:</b> ' + text + '</div>'
break
}
case 'Success': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-success" role="alert"><i class="tutorial-fa tutorial-check-square-o"></i> <b>Tip:</b> ' + text + '</div>'
break
}
case 'Important': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-important" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Important:</b> ' + text + '</div>'
break
}
case 'Warning': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-warning" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Warning:</b> ' + text + '</div>'
break
}
@@ -1,4 +1,4 @@
function newSuperalgosUtilitiesDocs() {
function newEducationUtilitiesDocs() {
let thisObject = {
buildOrderedPageIndex: buildOrderedPageIndex,
addWarningIfTranslationIsOutdated: addWarningIfTranslationIsOutdated,
@@ -94,7 +94,7 @@ function newSuperalgosUtilitiesDocs() {
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.updated === undefined) { continue }
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) {
if (translation.language === UI.projects.education.spaces.docsSpace.language) {
if (paragraph.updated < translation.updated) {
return ''
} else {
@@ -111,17 +111,17 @@ function newSuperalgosUtilitiesDocs() {
if (paragraph.translations.length === 0) { return paragraph.text }
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) { return translation.text }
if (translation.language === UI.projects.education.spaces.docsSpace.language) { return translation.text }
}
return paragraph.text
}
function setTextBasedOnLanguage(paragraph, text) {
if (UI.projects.superalgos.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
if (UI.projects.education.spaces.docsSpace.language === UI.projects.education.globals.docs.DEFAULT_LANGUAGE) {
if (paragraph.text !== text) {
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
paragraph.text = text
paragraph.updated = (new Date()).valueOf()
@@ -142,11 +142,11 @@ function newSuperalgosUtilitiesDocs() {
}
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) {
if (translation.language === UI.projects.education.spaces.docsSpace.language) {
if (translation.text !== text) {
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
translation.text = text
translation.updated = (new Date()).valueOf()
@@ -155,14 +155,14 @@ function newSuperalgosUtilitiesDocs() {
}
}
let translation = {
language: UI.projects.superalgos.spaces.docsSpace.language,
language: UI.projects.education.spaces.docsSpace.language,
text: text,
updated: (new Date()).valueOf()
}
paragraph.translations.push(translation)
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
return
}
@@ -489,25 +489,25 @@ function newSuperalgosUtilitiesDocs() {
let found = false
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase4) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase4) === true) {
changedText = changedText + phrase4.replace(cleanPhrase4, '<i>' + cleanPhrase4 + '</i>') + ' '
i = i + 3
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase3) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase3) === true) {
changedText = changedText + phrase3.replace(cleanPhrase3, '<i>' + cleanPhrase3 + '</i>') + ' '
i = i + 2
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase2) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase2) === true) {
changedText = changedText + phrase2.replace(cleanPhrase2, '<i>' + cleanPhrase2 + '</i>') + ' '
i = i + 1
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase1) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase1) === true) {
changedText = changedText + phrase1.replace(cleanPhrase1, '<i>' + cleanPhrase1 + '</i>') + ' '
i = i + 0
found = true
@@ -523,8 +523,8 @@ function newSuperalgosUtilitiesDocs() {
function addToolTips(text, excludedType) {
const TOOL_TIP_HTML = '<div onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip">TYPE_LABEL<span class="docs-tooltiptext">DEFINITION</span></div>'
const LINK_ONLY_HTML = '<div onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-link">TYPE_LABEL<span class="docs-tooltiptext"></span></div>'
const TOOL_TIP_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip">TYPE_LABEL<span class="docs-tooltiptext">DEFINITION</span></div>'
const LINK_ONLY_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-link">TYPE_LABEL<span class="docs-tooltiptext"></span></div>'
let resultingText = ''
text = tagDefinedTypes(text, excludedType)
@@ -586,7 +586,7 @@ function newSuperalgosUtilitiesDocs() {
return text
}
let definition = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
let definition = UI.projects.education.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
if (definition === undefined || definition === "") {
let tooltip = LINK_ONLY_HTML
.replace('CATEGORY', category)
@@ -1,4 +1,4 @@
function newSuperalgosUtilitiesLanguages() {
function newEducationUtilitiesLanguages() {
let thisObject = {
getLaguageLabel: getLaguageLabel
}
+98 -75
View File
@@ -4,11 +4,6 @@
"propertyName": "superalgos",
"UI": {
"globals": [
{
"name": "Docs",
"propertyName": "docs",
"functionName": "newSuperalgosGlobalsDocs"
},
{
"name": "Zoom",
"propertyName": "zoom",
@@ -208,21 +203,11 @@
"propertyName": "strings",
"functionName": "newSuperalgosUtilitiesStrings"
},
{
"name": "Languages",
"propertyName": "languages",
"functionName": "newSuperalgosUtilitiesLanguages"
},
{
"name": "Git Branches",
"propertyName": "gitBranches",
"functionName": "newSuperalgosUtilitiesGitBranches"
},
{
"name": "Docs",
"propertyName": "docs",
"functionName": "newSuperalgosUtilitiesDocs"
},
{
"name": "Status Bar",
"propertyName": "statusBar",
@@ -238,10 +223,10 @@
"initializationIndex": 0,
"animationPhysicsIndex": 1,
"animationDrawIndex": 0,
"onMouseWheelIndex": 6,
"onMouseOverIndex": 8,
"onMouseClickIndex": 8,
"onMouseDownIndex": 8
"onMouseWheelIndex": 5,
"onMouseOverIndex": 4,
"onMouseClickIndex": 5,
"onMouseDownIndex": 6
},
{
"name": "Top Space",
@@ -249,11 +234,11 @@
"propertyName": "topSpace",
"functionName": "newSuperalgosTopSpace",
"initializationIndex": 1,
"animationPhysicsIndex": 7,
"animationDrawIndex": 5,
"onMouseOverIndex": 4,
"onMouseClickIndex": 4,
"onMouseDownIndex": 4
"animationPhysicsIndex": 5,
"animationDrawIndex": 4,
"onMouseOverIndex": 1,
"onMouseClickIndex": 2,
"onMouseDownIndex": 2
},
{
"name": "Cockpit Space",
@@ -263,10 +248,10 @@
"initializationIndex": 2,
"animationPhysicsIndex": 0,
"animationDrawIndex": 6,
"onMouseWheelIndex": 4,
"onMouseOverIndex": 5,
"onMouseClickIndex": 5,
"onMouseDownIndex": 5
"onMouseWheelIndex": 3,
"onMouseOverIndex": 2,
"onMouseClickIndex": 3,
"onMouseDownIndex": 3
},
{
"name": "Design Space",
@@ -277,9 +262,9 @@
"animationPhysicsIndex": 3,
"animationDrawIndex": 2,
"onMouseWheelIndex": 0,
"onMouseOverIndex": 3,
"onMouseClickIndex": 3,
"onMouseDownIndex": 3
"onMouseOverIndex": 0,
"onMouseClickIndex": 1,
"onMouseDownIndex": 1
},
{
"name": "Panel Space",
@@ -289,10 +274,10 @@
"initializationIndex": 4,
"animationPhysicsIndex": 4,
"animationDrawIndex": 3,
"onMouseWheelIndex": 3,
"onMouseOverIndex": 6,
"onMouseClickIndex": 6,
"onMouseDownIndex": 6
"onMouseWheelIndex": 2,
"onMouseOverIndex": 3,
"onMouseClickIndex": 4,
"onMouseDownIndex": 4
},
{
"name": "Charting Space",
@@ -302,10 +287,10 @@
"initializationIndex": 5,
"animationPhysicsIndex": 2,
"animationDrawIndex": 1,
"onMouseWheelIndex": 5,
"onMouseWheelIndex": 4,
"onMouseOverIndex": 7,
"onMouseClickIndex": 7,
"onMouseDownIndex": 7
"onMouseClickIndex": 6,
"onMouseDownIndex": 5
},
{
"name": "Side Space",
@@ -313,44 +298,18 @@
"propertyName": "sideSpace",
"functionName": "newSuperalgosSideSpace",
"initializationIndex": 6,
"animationPhysicsIndex": 8,
"animationDrawIndex": 8,
"onMouseWheelIndex": 2,
"onMouseOverIndex": 2,
"onMouseClickIndex": 2,
"onMouseDownIndex": 2
},
{
"name": "Docs Space",
"folderName": "Docs-Space",
"propertyName": "docsSpace",
"functionName": "newSuperalgosDocSpace",
"initializationIndex": 7,
"animationPhysicsIndex": 5,
"animationDrawIndex": 7,
"animationPhysicsIndex": 6,
"animationDrawIndex": 5,
"onMouseWheelIndex": 1,
"onMouseOverIndex": 1,
"onMouseClickIndex": 1,
"onMouseDownIndex": 1
"onMouseOverIndex": 2,
"onMouseClickIndex": 0,
"onMouseDownIndex": 0
},
{
"name": "Chat Space",
"folderName": "Chat-Space",
"propertyName": "chatSpace",
"functionName": "newSuperalgosChatSpace"
},
{
"name": "Tutorial Space",
"folderName": "Tutorial-Space",
"propertyName": "tutorialSpace",
"functionName": "newSuperalgosTutorialSpace",
"initializationIndex": 8,
"animationPhysicsIndex": 6,
"animationDrawIndex": 4,
"onMouseWheelIndex": 0,
"onMouseOverIndex": 0,
"onMouseClickIndex": 0,
"onMouseDownIndex": 0
}
]
},
@@ -492,12 +451,6 @@
"functionName": "newSuperalgosUtilitiesMiscellaneousFunctions",
"fileName": "MiscellaneousFunctions.js"
},
{
"name": "Docs Functions",
"propertyName": "docsFunctions",
"functionName": "newSuperalgosUtilitiesDocsFunctions",
"fileName": "DocsFunctions.js"
},
{
"name": "Error Handling Functions",
"propertyName": "errorHandlingFunctions",
@@ -1091,5 +1044,75 @@
},
"TS": {},
"CL": {}
},
{
"name": "Education",
"propertyName": "education",
"UI": {
"globals": [
{
"name": "Docs",
"propertyName": "docs",
"functionName": "newEducationGlobalsDocs"
}
],
"functionLibraries": [],
"utilities": [
{
"name": "Languages",
"propertyName": "languages",
"functionName": "newEducationUtilitiesLanguages"
},
{
"name": "Docs",
"propertyName": "docs",
"functionName": "newEducationUtilitiesDocs"
}
],
"spaces": [
{
"name": "Docs Space",
"folderName": "Docs-Space",
"propertyName": "docsSpace",
"functionName": "newEducationDocSpace",
"initializationIndex": 0,
"animationPhysicsIndex": 0,
"animationDrawIndex": 0,
"onMouseWheelIndex": 0,
"onMouseOverIndex": 0,
"onMouseClickIndex": 0,
"onMouseDownIndex": 0
},
{
"name": "Tutorial Space",
"folderName": "Tutorial-Space",
"propertyName": "tutorialSpace",
"functionName": "newEducationTutorialSpace",
"initializationIndex": 1,
"animationPhysicsIndex": 1,
"animationDrawIndex": 1,
"onMouseWheelIndex": 1,
"onMouseOverIndex": 1,
"onMouseClickIndex": 1,
"onMouseDownIndex": 1
}
]
},
"TS": {
"globals": [],
"functionLibraries": [],
"utilities": [
{
"name": "Docs Functions",
"propertyName": "docsFunctions",
"functionName": "newEducationUtilitiesDocsFunctions",
"fileName": "DocsFunctions.js"
}
],
"taskModules": [],
"processModules": [],
"botModules": []
},
"CL": {}
}
]
@@ -263,7 +263,7 @@ exports.newSuperalgosBotModulesLearningSimulation = function (processIndex) {
candleIndex: learningEngine.learningCurrent.learningEpisode.candle.index.value,
cycle: learningEngine.learningCurrent.learningEpisode.cycle.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
learningSystem.addInfo([learningSystem.id, infoMessage, docs])
@@ -358,7 +358,7 @@ exports.newSuperalgosBotModulesLearningSystem = function (processIndex) {
type: 'TS LF Learning Bot Error - Evaluating Condition Error',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, nodeName, code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, nodeName, code, undefined)
}
learningSystem.conditions.set(node.id, value)
@@ -398,7 +398,7 @@ exports.newSuperalgosBotModulesLearningSystem = function (processIndex) {
type: 'TS LF Learning Bot Error - Evaluating Formula Error',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
}
if (errorMessage !== undefined) {
@@ -415,7 +415,7 @@ exports.newSuperalgosBotModulesLearningSystem = function (processIndex) {
type: 'TS LF Learning Bot Error - Formula Value Not A Number',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
learningSystem.addError([node.id, 'Formula needs to return a numeric value.', docs])
return
@@ -93,7 +93,7 @@
orderId: orderId
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, tradingSystemOrder.name, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, tradingSystemOrder.name, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystemOrder.id, message, docs])
@@ -203,7 +203,7 @@
keyLength: exchangeApiKey.config.codeName.length,
secretLength: exchangeApiKey.config.secret.length
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, exchangeApiKey.name, undefined, exchangeApiKey.config, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, exchangeApiKey.name, undefined, exchangeApiKey.config, undefined, contextInfo)
tradingSystem.addError([exchangeApiKey.id, message, docs])
@@ -251,7 +251,7 @@
orderId: orderId
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, tradingSystemOrder.name, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, tradingSystemOrder.name, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystemOrder.id, message, docs])
logError("cancelOrder -> Error = " + err.message);
@@ -57,7 +57,7 @@ exports.newSuperalgosBotModulesAnnouncements = function (processIndex) {
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, announcement.announcementCondition.name, announcement.announcementCondition.code, undefined, undefined, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, announcement.announcementCondition.name, announcement.announcementCondition.code, undefined, undefined, undefined)
tradingSystem.addError([announcement.announcementCondition.id, err.message, docs])
}
@@ -82,7 +82,7 @@ exports.newSuperalgosBotModulesAnnouncements = function (processIndex) {
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, announcement.announcementFormula.name, announcement.announcementFormula.code, undefined, undefined, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, announcement.announcementFormula.name, announcement.announcementFormula.code, undefined, undefined, undefined)
tradingSystem.addError([announcement.announcementFormula.id, err.message, docs])
}
@@ -174,7 +174,7 @@ exports.newSuperalgosBotModulesOrdersCalculations = function (processIndex) {
actualRate: tradingEngineOrder.orderStatistics.actualRate.value,
orderRate: tradingEngineOrder.rate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -214,7 +214,7 @@ exports.newSuperalgosBotModulesOrdersCalculations = function (processIndex) {
actualRate: tradingEngineOrder.orderStatistics.actualRate.value,
orderRate: tradingEngineOrder.rate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -102,7 +102,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
orderRate: tradingEngineOrder.rate.value,
actualRate: tradingEngineOrder.orderStatistics.actualRate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -129,7 +129,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
orderRate: tradingEngineOrder.rate.value,
actualRate: tradingEngineOrder.orderStatistics.actualRate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -177,7 +177,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
previousActualRate: tradingEngineOrder.orderStatistics.actualRate.value,
recalculatedActualRate: newValue
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -220,7 +220,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
previousActualRate: tradingEngineOrder.orderStatistics.actualRate.value,
recalculatedActualRate: tradingEngine.tradingCurrent.tradingEpisode.candle.max.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -247,7 +247,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
previousActualRate: tradingEngineOrder.orderStatistics.actualRate.value,
recalculatedActualRate: tradingEngine.tradingCurrent.tradingEpisode.candle.max.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -289,7 +289,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
actualRate: tradingEngineOrder.orderStatistics.actualRate.value,
orderRate: tradingEngineOrder.rate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -334,7 +334,7 @@ exports.newSuperalgosBotModulesOrdersSimulations = function (processIndex) {
actualRate: tradingEngineOrder.orderStatistics.actualRate.value,
orderRate: tradingEngineOrder.rate.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -265,7 +265,7 @@ exports.newSuperalgosBotModulesSnapshots = function (processIndex) {
let contextInfo = {
instruction: instruction
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, nodeWithCode.name, nodeWithCode.code, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, nodeWithCode.name, nodeWithCode.code, undefined, undefined, contextInfo)
tradingSystem.addError([nodeWithCode.id, message, docs])
values.push(0)
@@ -282,7 +282,7 @@ exports.newSuperalgosBotModulesSnapshots = function (processIndex) {
type: 'TS LF Trading Bot Error - ' + message,
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, nodeWithCode.name, nodeWithCode.code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, nodeWithCode.name, nodeWithCode.code, undefined)
tradingSystem.addError([nodeWithCode.id, message, docs])
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[ERROR] runSimulation -> addCodeToSnapshot -> nodeWithCode.code = ' + nodeWithCode.code)
@@ -85,7 +85,7 @@ exports.newSuperalgosBotModulesTradingExecution = function (processIndex) {
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err)
tradingSystem.addError([executionNode.id, message, docs])
}
@@ -459,7 +459,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
sizePlaced: tradingEngineStage.stageBaseAsset.sizePlaced.value,
targetSize: tradingEngineStage.stageBaseAsset.targetSize.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -505,7 +505,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
sizePlaced: tradingEngineStage.stageQuotedAsset.sizePlaced.value,
targetSize: tradingEngineStage.stageQuotedAsset.targetSize.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -542,7 +542,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
orderQuotedAssetSize: tradingEngineOrder.orderQuotedAsset.size.value,
episodeQuotedAssetBalance: tradingEngine.tradingCurrent.tradingEpisode.episodeQuotedAsset.balance.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -572,7 +572,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
orderBaseAssetSize: tradingEngineOrder.orderBaseAsset.size.value,
episodeBaseAssetBalance: tradingEngine.tradingCurrent.tradingEpisode.episodeBaseAsset.balance.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addWarning(
[
@@ -711,7 +711,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
return true
@@ -744,7 +744,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
@@ -771,7 +771,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
@@ -807,7 +807,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
@@ -878,7 +878,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
}
@@ -1110,7 +1110,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
@@ -1192,7 +1192,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
contextInfo = {
exitType: tradingEngineOrder.exitType.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystemOrder.id, message, docs])
@@ -245,7 +245,7 @@ exports.newSuperalgosBotModulesTradingPosition = function (processIndex) {
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, value, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, value, undefined)
badDefinitionUnhandledException(undefined, message, tradingSystemStageNode.initialTargets.targetRate, docs)
}
@@ -225,7 +225,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) {
candleIndex: tradingEngine.tradingCurrent.tradingEpisode.candle.index.value,
cycle: tradingEngine.tradingCurrent.tradingEpisode.cycle.value
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addInfo([tradingSystem.id, infoMessage, docs])
@@ -577,7 +577,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) {
sessionBaseAssetMinimumBalance: sessionParameters.sessionBaseAsset.config.minimumBalance
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystem.id, errorMessage, docs])
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -603,7 +603,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) {
sessionBaseAssetMaximumBalance: sessionParameters.sessionBaseAsset.config.maximumBalance
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystem.id, errorMessage, docs])
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -629,7 +629,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) {
sessionQuotedAssetMinimumBalance: sessionParameters.sessionQuotedAsset.config.minimumBalance
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystem.id, errorMessage, docs])
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -655,7 +655,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) {
sessionQuotedAssetMaximumBalance: sessionParameters.sessionQuotedAsset.config.maximumBalance
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
tradingSystem.addError([tradingSystem.id, errorMessage, docs])
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -338,7 +338,7 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
type: 'TS LF Trading Bot Error - Evaluating Condition Error',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, nodeName, code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, nodeName, code, undefined)
}
tradingSystem.conditions.set(node.id, value)
@@ -378,7 +378,7 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
type: 'TS LF Trading Bot Error - Evaluating Formula Error',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
}
if (errorMessage !== undefined) {
@@ -395,7 +395,7 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
type: 'TS LF Trading Bot Error - Formula Value Not A Number',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
tradingSystem.addError([node.id, 'Formula needs to return a numeric value.', docs])
return
@@ -411,7 +411,7 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
type: 'TS LF Trading Bot Error - Formula Value Not A Number',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, undefined, node.name, node.code, undefined, value)
tradingSystem.addError([node.id, 'Formula needs to return a numeric value.', docs])
return
@@ -439,7 +439,7 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
type: 'TS LF Trading Bot Error - Evaluating User Code Error',
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
TS.projects.education.utilities.docsFunctions.buildPlaceholder(docs, err, node.name, node.code, undefined)
}
if (errorMessage !== undefined) {
@@ -31,7 +31,7 @@ exports.newSuperalgosUtilitiesErrorHandlingFunctions = function () {
type: 'TS ' + source + ' Error - ' + message,
placeholder: {}
}
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(
TS.projects.education.utilities.docsFunctions.buildPlaceholder(
docs,
err,
node.name,
@@ -529,37 +529,37 @@ function newSuperalgosActionSwitch() {
break
case 'Play Tutorial':
{
UI.projects.superalgos.spaces.tutorialSpace.playTutorial(action.node)
UI.projects.education.spaces.tutorialSpace.playTutorial(action.node)
}
break
case 'Play Tutorial Topic':
{
UI.projects.superalgos.spaces.tutorialSpace.playTutorialTopic(action.node)
UI.projects.education.spaces.tutorialSpace.playTutorialTopic(action.node)
}
break
case 'Play Tutorial Step':
{
UI.projects.superalgos.spaces.tutorialSpace.playTutorialStep(action.node)
UI.projects.education.spaces.tutorialSpace.playTutorialStep(action.node)
}
break
case 'Resume Tutorial':
{
UI.projects.superalgos.spaces.tutorialSpace.resumeTutorial(action.node)
UI.projects.education.spaces.tutorialSpace.resumeTutorial(action.node)
}
break
case 'Resume Tutorial Topic':
{
UI.projects.superalgos.spaces.tutorialSpace.resumeTutorialTopic(action.node)
UI.projects.education.spaces.tutorialSpace.resumeTutorialTopic(action.node)
}
break
case 'Resume Tutorial Step':
{
UI.projects.superalgos.spaces.tutorialSpace.resumeTutorialStep(action.node)
UI.projects.education.spaces.tutorialSpace.resumeTutorialStep(action.node)
}
break
case 'Reset Tutorial Progress':
{
UI.projects.superalgos.spaces.tutorialSpace.resetTutorialProgress(action.node)
UI.projects.education.spaces.tutorialSpace.resetTutorialProgress(action.node)
}
break
case 'Send Webhook Test Message':
@@ -634,7 +634,7 @@ function newSuperalgosActionSwitch() {
{
let definition = getSchemaDocument(action.node)
if (definition !== undefined) {
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(action.node.project, 'Node', action.node.type)
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(action.node.project, 'Node', action.node.type)
}
}
break
@@ -50,14 +50,14 @@ function newNodesErrors() {
let docs = arrayItem[2]
applyValue(nodeId, errorMessage, docs)
if (UI.projects.superalgos.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (UI.projects.education.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
) {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
docs.project,
docs.category,
docs.type,
@@ -68,7 +68,7 @@ function newNodesErrors() {
}
} else {
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(
docs.project,
docs.category,
docs.type,
@@ -50,14 +50,14 @@ function newNodesInfos() {
let docs = arrayItem[2]
applyValue(nodeId, infoMessage, docs)
if (UI.projects.superalgos.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (UI.projects.education.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
) {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
docs.project,
docs.category,
docs.type,
@@ -68,7 +68,7 @@ function newNodesInfos() {
}
} else {
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(
docs.project,
docs.category,
docs.type,
@@ -68,14 +68,14 @@ function newNodesWarnings() {
applyValue(nodeId, value, docs)
}
if (UI.projects.superalgos.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (UI.projects.education.spaces.docsSpace.sidePanelTab.isOpen === true) {
if (
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project !== docs.project ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category !== docs.category ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type !== docs.type ||
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId !== nodeId
) {
UI.projects.superalgos.spaces.docsSpace.navigateTo(
UI.projects.education.spaces.docsSpace.navigateTo(
docs.project,
docs.category,
docs.type,
@@ -86,7 +86,7 @@ function newNodesWarnings() {
}
} else {
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(
docs.project,
docs.category,
docs.type,
@@ -109,7 +109,7 @@ function newWorkspace() {
UI.projects.superalgos.utilities.statusBar.changeStatus("Setting up Docs Search Engine...")
setTimeout(theEnd, 100)
function theEnd() {
UI.projects.superalgos.spaces.docsSpace.searchEngine.setUpSearchEngine(onIndexingFinished)
UI.projects.education.spaces.docsSpace.searchEngine.setUpSearchEngine(onIndexingFinished)
function onIndexingFinished() {
setupEventsServerClients()
@@ -270,7 +270,7 @@ function newWorkspace() {
UI.projects.superalgos.utilities.statusBar.changeStatus('Saving Workspace ' + thisObject.workspaceNode.name + '.')
workingAtTask = 0
UI.projects.superalgos.spaces.docsSpace.sidePanelTab.close()
UI.projects.education.spaces.docsSpace.sidePanelTab.close()
UI.projects.superalgos.spaces.sideSpace.sidePanelTab.close()
UI.projects.superalgos.spaces.floatingSpace.inMapMode = true
saveWorkspace(takeAction)
@@ -288,7 +288,7 @@ function newWorkspace() {
async function takeAction() {
thisObject.isInitialized = false
UI.projects.superalgos.spaces.tutorialSpace.stop()
UI.projects.education.spaces.tutorialSpace.stop()
let result = await executeAction({ node: thisObject.workspaceNode, name: 'Delete Workspace', project: 'Superalgos', callBackFunction: onDeleted })
if (result === false) {
@@ -378,8 +378,8 @@ function newWorkspace() {
workingAtTask = 0
function takeAction() {
UI.projects.superalgos.spaces.docsSpace.reset()
UI.projects.superalgos.spaces.docsSpace.searchEngine.setUpSearchEngine(onIndexingFinished) // The docs needs to index the loaded workspace.
UI.projects.education.spaces.docsSpace.reset()
UI.projects.education.spaces.docsSpace.searchEngine.setUpSearchEngine(onIndexingFinished) // The docs needs to index the loaded workspace.
function onIndexingFinished() {
UI.projects.superalgos.spaces.floatingSpace.inMapMode = false
thisObject.isInitialized = true
@@ -88,10 +88,10 @@ function newUiObjectMessage() {
if (thisObject.isVisibleFunction(checkPoint) === true) {
if (thisObject.docs !== undefined) {
if (UI.projects.superalgos.spaces.docsSpace.sidePanelTab.isOpen === true) {
UI.projects.superalgos.spaces.docsSpace.sidePanelTab.close()
if (UI.projects.education.spaces.docsSpace.sidePanelTab.isOpen === true) {
UI.projects.education.spaces.docsSpace.sidePanelTab.close()
} else {
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo(
UI.projects.education.spaces.docsSpace.openSpaceAreaAndNavigateTo(
thisObject.docs.project,
thisObject.docs.category,
thisObject.docs.type,
+3 -3
View File
@@ -50,8 +50,8 @@ function newCanvas() {
function finalize() {
try {
UI.projects.superalgos.spaces.tutorialSpace.finalize()
UI.projects.superalgos.spaces.docsSpace.finalize()
UI.projects.education.spaces.tutorialSpace.finalize()
UI.projects.education.spaces.docsSpace.finalize()
//thisObject.chatSpace.finalize()
UI.projects.superalgos.spaces.sideSpace.finalize()
UI.projects.superalgos.spaces.chartingSpace.finalize()
@@ -380,7 +380,7 @@ function newCanvas() {
return
}
/* When the Docs is Visible, we do not process key down events of the Designer Space. */
if (UI.projects.superalgos.spaces.docsSpace.isVisible === true) {
if (UI.projects.education.spaces.docsSpace.isVisible === true) {
return
}
thisObject.mouse.event = event