From 71540e4b68db465a4734d5358338276d9496afb1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 9 Jun 2021 15:18:07 +0200 Subject: [PATCH] Technical Debt Payment: Moving Docs and Tutorials to Education Project --- Client/WebServer/index.html | 8 +- .../TS/Utilities/DocsFunctions.js | 2 +- .../UI/Function-Libraries/ActionSwitch.js | 26 ++ .../UI/Globals/Docs.js | 2 +- .../UI/Spaces/Docs-Space/CommandInterface.js | 282 ++++++++-------- .../UI/Spaces/Docs-Space/ContextMenu.js | 124 +++---- .../UI/Spaces/Docs-Space/DocsSpace.js | 86 ++--- .../UI/Spaces/Docs-Space/DocumentPage.js | 308 +++++++++--------- .../UI/Spaces/Docs-Space/Footer.js | 62 ++-- .../UI/Spaces/Docs-Space/MainSearchPage.js | 22 +- .../UI/Spaces/Docs-Space/SearchEngine.js | 0 .../UI/Spaces/Docs-Space/SearchResultsPage.js | 20 +- .../UI/Spaces/Tutorial-Space/TutorialSpace.js | 130 ++++---- .../UI/Utilities/Docs.js | 32 +- .../UI/Utilities/Languages.js | 2 +- Projects/ProjectsSchema.json | 173 +++++----- .../LearningSimulation.js | 2 +- .../Low-Frequency-Learning/LearningSystem.js | 6 +- .../Low-Frequency-Trading/APIs/ExchangeAPI.js | 6 +- .../Low-Frequency-Trading/Announcements.js | 4 +- .../OrdersCalculations.js | 4 +- .../OrdersSimulations.js | 14 +- .../Low-Frequency-Trading/Snapshots.js | 4 +- .../Low-Frequency-Trading/TradingExecution.js | 2 +- .../Low-Frequency-Trading/TradingOrders.js | 22 +- .../Low-Frequency-Trading/TradingPosition.js | 2 +- .../TradingSimulation.js | 10 +- .../Low-Frequency-Trading/TradingSystem.js | 10 +- .../TS/Utilities/ErrorHandlingFunctions.js | 2 +- .../UI/Function-Libraries/ActionSwitch.js | 16 +- .../Charting-Space/Plotting/NodesErrors.js | 14 +- .../Charting-Space/Plotting/NodesInfos.js | 14 +- .../Charting-Space/Plotting/NodesWarnings.js | 14 +- .../UI/Spaces/Design-Space/Workspace.js | 10 +- .../Spaces/Floating-Space/UiObjectMessage.js | 6 +- UI/Canvas.js | 6 +- 36 files changed, 748 insertions(+), 699 deletions(-) rename Projects/{Superalgos => Education}/TS/Utilities/DocsFunctions.js (97%) create mode 100644 Projects/Education/UI/Function-Libraries/ActionSwitch.js rename Projects/{Superalgos => Education}/UI/Globals/Docs.js (92%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/CommandInterface.js (60%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/ContextMenu.js (60%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/DocsSpace.js (77%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/DocumentPage.js (81%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/Footer.js (65%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/MainSearchPage.js (65%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/SearchEngine.js (100%) rename Projects/{Superalgos => Education}/UI/Spaces/Docs-Space/SearchResultsPage.js (90%) rename Projects/{Superalgos => Education}/UI/Spaces/Tutorial-Space/TutorialSpace.js (90%) rename Projects/{Superalgos => Education}/UI/Utilities/Docs.js (92%) rename Projects/{Superalgos => Education}/UI/Utilities/Languages.js (96%) diff --git a/Client/WebServer/index.html b/Client/WebServer/index.html index 63bad19e4..c8b9ad9fe 100644 --- a/Client/WebServer/index.html +++ b/Client/WebServer/index.html @@ -77,21 +77,21 @@ + onclick="UI.projects.education.spaces.tutorialSpace.previous()" value="">Previous diff --git a/Projects/Superalgos/TS/Utilities/DocsFunctions.js b/Projects/Education/TS/Utilities/DocsFunctions.js similarity index 97% rename from Projects/Superalgos/TS/Utilities/DocsFunctions.js rename to Projects/Education/TS/Utilities/DocsFunctions.js index e71e448ae..bce3fbcdd 100644 --- a/Projects/Superalgos/TS/Utilities/DocsFunctions.js +++ b/Projects/Education/TS/Utilities/DocsFunctions.js @@ -1,4 +1,4 @@ -exports.newSuperalgosUtilitiesDocsFunctions = function () { +exports.newEducationUtilitiesDocsFunctions = function () { let thisObject = { buildPlaceholder: buildPlaceholder diff --git a/Projects/Education/UI/Function-Libraries/ActionSwitch.js b/Projects/Education/UI/Function-Libraries/ActionSwitch.js new file mode 100644 index 000000000..aa14e6591 --- /dev/null +++ b/Projects/Education/UI/Function-Libraries/ActionSwitch.js @@ -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) + } + } + } +} diff --git a/Projects/Superalgos/UI/Globals/Docs.js b/Projects/Education/UI/Globals/Docs.js similarity index 92% rename from Projects/Superalgos/UI/Globals/Docs.js rename to Projects/Education/UI/Globals/Docs.js index 2a91724d2..67d4b93e5 100644 --- a/Projects/Superalgos/UI/Globals/Docs.js +++ b/Projects/Education/UI/Globals/Docs.js @@ -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', diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js b/Projects/Education/UI/Spaces/Docs-Space/CommandInterface.js similarity index 60% rename from Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js rename to Projects/Education/UI/Spaces/Docs-Space/CommandInterface.js index dbbe16bc2..08b425cf3 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js +++ b/Projects/Education/UI/Spaces/Docs-Space/CommandInterface.js @@ -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') } } } \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/ContextMenu.js b/Projects/Education/UI/Spaces/Docs-Space/ContextMenu.js similarity index 60% rename from Projects/Superalgos/UI/Spaces/Docs-Space/ContextMenu.js rename to Projects/Education/UI/Spaces/Docs-Space/ContextMenu.js index b2dd3d6f1..be95fd129 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/ContextMenu.js +++ b/Projects/Education/UI/Spaces/Docs-Space/ContextMenu.js @@ -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 } } diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js similarity index 77% rename from Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js rename to Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js index 54efedfe5..e7c7779ad 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js @@ -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 diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js b/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js similarity index 81% rename from Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js rename to Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js index d6d223563..46bb98b3a 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js +++ b/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js @@ -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 + '
' - HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader() + HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader() HTML = HTML + '
' HTML = HTML + '
' // Common Style Container Starts @@ -147,7 +147,7 @@ function newSuperalgosDocsDocumentPage() { /* Title */ let titleLabel = thisObject.docsSchemaDocument.type - HTML = HTML + '

' + titleLabel + '

' + HTML = HTML + '

' + titleLabel + '

' 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 + '

' + titleLabel + '

' + HTML = HTML + '

' + titleLabel + '

' */ generateTopicPreviousAndNextPageNavigation() @@ -223,17 +223,17 @@ function newSuperalgosDocsDocumentPage() { HTML = HTML + '
' // 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 + '

' + titleLabel + '

' + HTML = HTML + '

' + titleLabel + '

' */ generateTutorialPreviousAndNextPageNavigation() @@ -249,17 +249,17 @@ function newSuperalgosDocsDocumentPage() { HTML = HTML + '' // 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 + '

' + titleLabel + '

' + HTML = HTML + '

' + titleLabel + '

' */ 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 + '
Summary: ' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' + HTML = HTML + '
Summary: ' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' } else { HTML = HTML + '
' @@ -314,7 +314,7 @@ function newSuperalgosDocsDocumentPage() { definitionImagesArray.push(imageItem) HTML = HTML + '
' - HTML = HTML + '
' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' + HTML = HTML + '
' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' HTML = HTML + '
' } @@ -333,11 +333,11 @@ function newSuperalgosDocsDocumentPage() { HTML = HTML + '
' if (previousPage !== undefined) { - HTML = HTML + '
' + previousPage.type + HTML = HTML + '
' + previousPage.type } HTML = HTML + '
' if (nextPage !== undefined) { - HTML = HTML + '
' + nextPage.type + HTML = HTML + '
' + nextPage.type } HTML = HTML + '
' return @@ -361,7 +361,7 @@ function newSuperalgosDocsDocumentPage() { text: "" + arrayItem.type + "" } autoGeneratedParagraphIndex++ - HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' + HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' } } @@ -379,11 +379,11 @@ function newSuperalgosDocsDocumentPage() { HTML = HTML + '
' if (previousPage !== undefined) { - HTML = HTML + '
' + previousPage.type + HTML = HTML + '
' + previousPage.type } HTML = HTML + '
' if (nextPage !== undefined) { - HTML = HTML + '
' + nextPage.type + HTML = HTML + '
' + nextPage.type } HTML = HTML + '
' return @@ -407,7 +407,7 @@ function newSuperalgosDocsDocumentPage() { text: "" + arrayItem.type + "" } autoGeneratedParagraphIndex++ - HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' + HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' } } @@ -424,11 +424,11 @@ function newSuperalgosDocsDocumentPage() { HTML = HTML + '
' if (previousPage !== undefined) { - HTML = HTML + '
' + previousPage.type + HTML = HTML + '
' + previousPage.type } HTML = HTML + '
' if (nextPage !== undefined) { - HTML = HTML + '
' + nextPage.type + HTML = HTML + '
' + nextPage.type } HTML = HTML + '
' return @@ -452,7 +452,7 @@ function newSuperalgosDocsDocumentPage() { text: "" + arrayItem.type + "" } autoGeneratedParagraphIndex++ - HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' + HTML = HTML + '

' + arrayItem.pageNumber + '. ' + '' + paragraph.text + '

' } } @@ -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 + '' // 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 + '' + HTML = HTML + '' HTML = HTML + '
' paragraph = { @@ -1148,7 +1148,7 @@ function newSuperalgosDocsDocumentPage() { for (let i = 0; i < nodeList.length; i++) { let listItem = nodeList[i] if (listItem === "") { continue } - HTML = HTML + '' + HTML = HTML + '' } } } @@ -1203,7 +1203,7 @@ function newSuperalgosDocsDocumentPage() { for (let i = 0; i < nodeList.length; i++) { let listItem = nodeList[i] if (listItem === "") { continue } - HTML = HTML + '' + HTML = HTML + '' } } } @@ -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 = ' Note:' 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 = ' Tip:' 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 = ' Important:' 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 = ' Warning:' 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 = ' Error:' 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 = 'Summary:' 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 = '' 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 = '' - sufix = '
' + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph) + sufix = '' + 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 + '

' + prefix + ' ' + innerHTML + sufix + '

' - 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 = '
' hierarchyImagesArray.push(imageItem) - let matrixValue = '
' + imageContainer + '
' + UI.projects.superalgos.utilities.docs.addToolTips(schemaDocument.type, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' + let matrixValue = '
' + imageContainer + '
' + UI.projects.education.utilities.docs.addToolTips(schemaDocument.type, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '
' 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 } diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js b/Projects/Education/UI/Spaces/Docs-Space/Footer.js similarity index 65% rename from Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js rename to Projects/Education/UI/Spaces/Docs-Space/Footer.js index d5ccaaa57..83f842e44 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js +++ b/Projects/Education/UI/Spaces/Docs-Space/Footer.js @@ -28,21 +28,21 @@ function newSuperalgosDocsFooter() { HTML = HTML + '' @@ -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 + '
' - let languageCode = UI.projects.superalgos.spaces.docsSpace.language + let languageCode = UI.projects.education.spaces.docsSpace.language HTML = HTML + '' HTML = HTML + '' 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() } }); } diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/SearchEngine.js b/Projects/Education/UI/Spaces/Docs-Space/SearchEngine.js similarity index 100% rename from Projects/Superalgos/UI/Spaces/Docs-Space/SearchEngine.js rename to Projects/Education/UI/Spaces/Docs-Space/SearchEngine.js diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/SearchResultsPage.js b/Projects/Education/UI/Spaces/Docs-Space/SearchResultsPage.js similarity index 90% rename from Projects/Superalgos/UI/Spaces/Docs-Space/SearchResultsPage.js rename to Projects/Education/UI/Spaces/Docs-Space/SearchResultsPage.js index 2061b257f..3e20042ea 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/SearchResultsPage.js +++ b/Projects/Education/UI/Spaces/Docs-Space/SearchResultsPage.js @@ -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 + '
' - HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader() + HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader() // Tabs HTML = HTML + '
' @@ -251,7 +251,7 @@ function newSuperalgosDocsSearchResultsPage() { let nodeType = pathStep[1] let nodeProject = pathStep[2] let nodeId = pathStep[3] - let link = ' > ' + let link = ' > ' if (nodeName === 'New ' + nodeType || nodeName === 'My ' + nodeType || nodeName === undefined) { nodeName = '' } @@ -289,10 +289,10 @@ function newSuperalgosDocsSearchResultsPage() { mainLink = result.documentIndex.docsSchemaDocument.type } } - HTML = HTML + '

' + mainLink + '

' + HTML = HTML + '

' + mainLink + '

' if (result.documentIndex.docsSchemaDocument.definition !== undefined) { - HTML = HTML + '

' + UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '

' + HTML = HTML + '

' + UI.projects.education.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '

' } else { HTML = HTML + '

' + 'No definition available.' + '

' } @@ -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() } } } \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Tutorial-Space/TutorialSpace.js b/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js similarity index 90% rename from Projects/Superalgos/UI/Spaces/Tutorial-Space/TutorialSpace.js rename to Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js index f6c28144e..951fa7d0a 100644 --- a/Projects/Superalgos/UI/Spaces/Tutorial-Space/TutorialSpace.js +++ b/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js @@ -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 + '
' + text + '
' } else { html = html + '' @@ -1336,11 +1336,11 @@ function newSuperalgosTutorialSpace() { html = html + '' html = html + '' @@ -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 + '
' + text + '
' break } case 'Title': { - let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph) + let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph) html = html + '

' + text + '

' break } case 'Gif': { - let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph) + let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph) html = html + '
' 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 + '
' + text + '
' break } case 'Json': { - let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph) + let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph) html = html + '
' + text + '
' break } case 'Javascript': { - let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph) + let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph) html = html + '
' + text + '
' 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 + '
  • ' + text + '
' 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 + '
' + text + '
' 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 + '' + splittedText[0] + '' 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 + '' 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 + '' 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 + '' 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 + '' break } diff --git a/Projects/Superalgos/UI/Utilities/Docs.js b/Projects/Education/UI/Utilities/Docs.js similarity index 92% rename from Projects/Superalgos/UI/Utilities/Docs.js rename to Projects/Education/UI/Utilities/Docs.js index 72d33ac62..aea1ca6f6 100644 --- a/Projects/Superalgos/UI/Utilities/Docs.js +++ b/Projects/Education/UI/Utilities/Docs.js @@ -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, '' + cleanPhrase4 + '') + ' ' 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, '' + cleanPhrase3 + '') + ' ' 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, '' + cleanPhrase2 + '') + ' ' 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, '' + cleanPhrase1 + '') + ' ' i = i + 0 found = true @@ -523,8 +523,8 @@ function newSuperalgosUtilitiesDocs() { function addToolTips(text, excludedType) { - const TOOL_TIP_HTML = '
TYPE_LABELDEFINITION
' - const LINK_ONLY_HTML = '' + const TOOL_TIP_HTML = '
TYPE_LABELDEFINITION
' + const LINK_ONLY_HTML = '' 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) diff --git a/Projects/Superalgos/UI/Utilities/Languages.js b/Projects/Education/UI/Utilities/Languages.js similarity index 96% rename from Projects/Superalgos/UI/Utilities/Languages.js rename to Projects/Education/UI/Utilities/Languages.js index aaa308415..ae8af7ced 100644 --- a/Projects/Superalgos/UI/Utilities/Languages.js +++ b/Projects/Education/UI/Utilities/Languages.js @@ -1,4 +1,4 @@ -function newSuperalgosUtilitiesLanguages() { +function newEducationUtilitiesLanguages() { let thisObject = { getLaguageLabel: getLaguageLabel } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index b51491d4f..7819586b3 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -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": {} } ] \ No newline at end of file diff --git a/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js b/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js index 1897f73e7..e1a5cceed 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js +++ b/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js @@ -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]) diff --git a/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js b/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js index 380f2c156..f7beef704 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js +++ b/Projects/Superalgos/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js @@ -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 diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js index fe6392225..546c6d266 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js @@ -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); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Announcements.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Announcements.js index fa28ff6cc..1092295e3 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Announcements.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Announcements.js @@ -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]) } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js index 9ec3bd3cf..cb6814eb4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js @@ -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( [ diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js index 6a5c531ee..0339ad5c5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js @@ -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( [ diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js index a6d70e879..287c91400 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js @@ -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) diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingExecution.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingExecution.js index 68b447811..edc4bedf2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingExecution.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingExecution.js @@ -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]) } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js index a99e5cc46..48f5408a0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js @@ -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]) diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingPosition.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingPosition.js index ee3fb122b..b0fe71899 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingPosition.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingPosition.js @@ -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) } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js index cbf601b7d..f14f49d95 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js @@ -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, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js index cbf957349..1588a6158 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js @@ -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) { diff --git a/Projects/Superalgos/TS/Utilities/ErrorHandlingFunctions.js b/Projects/Superalgos/TS/Utilities/ErrorHandlingFunctions.js index 7362fbcd4..afbb7685e 100644 --- a/Projects/Superalgos/TS/Utilities/ErrorHandlingFunctions.js +++ b/Projects/Superalgos/TS/Utilities/ErrorHandlingFunctions.js @@ -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, diff --git a/Projects/Superalgos/UI/Function-Libraries/ActionSwitch.js b/Projects/Superalgos/UI/Function-Libraries/ActionSwitch.js index 2c9e6def4..34f6fb24a 100644 --- a/Projects/Superalgos/UI/Function-Libraries/ActionSwitch.js +++ b/Projects/Superalgos/UI/Function-Libraries/ActionSwitch.js @@ -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 diff --git a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesErrors.js b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesErrors.js index d58860085..987dfe9d4 100644 --- a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesErrors.js +++ b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesErrors.js @@ -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, diff --git a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesInfos.js b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesInfos.js index 9eb5d1efb..83911134b 100644 --- a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesInfos.js +++ b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesInfos.js @@ -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, diff --git a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesWarnings.js b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesWarnings.js index de00cb642..9120bbfcc 100644 --- a/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesWarnings.js +++ b/Projects/Superalgos/UI/Spaces/Charting-Space/Plotting/NodesWarnings.js @@ -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, diff --git a/Projects/Superalgos/UI/Spaces/Design-Space/Workspace.js b/Projects/Superalgos/UI/Spaces/Design-Space/Workspace.js index 3a617b9b3..54fb579ec 100644 --- a/Projects/Superalgos/UI/Spaces/Design-Space/Workspace.js +++ b/Projects/Superalgos/UI/Spaces/Design-Space/Workspace.js @@ -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 diff --git a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectMessage.js b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectMessage.js index a1180e6f3..c2ce58425 100644 --- a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectMessage.js +++ b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectMessage.js @@ -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, diff --git a/UI/Canvas.js b/UI/Canvas.js index e8bf8b28d..963ed7e01 100644 --- a/UI/Canvas.js +++ b/UI/Canvas.js @@ -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
' - 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 + '' + text + '' html = html + '