Merge pull request #1120 from Luis-Fernando-Molina/develop

Contribution: Technical Debt Payment: Moving Docs and Tutorials to Education Project
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-06-09 19:27:01 -04:00
commit 82f0751702
3574 files changed
+12326 -12227

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ My-Workspaces
debug.log
.DS_Store
*.db
Projects/Superalgos/Icons/Thumbs.db
Projects/Foundations/Icons/Thumbs.db
*.bat
!launch-windows.bat
!create-shortcut-windows.bat
+32 -32
View File
@@ -77,21 +77,21 @@
<tr>
<td align="center">
<label class="tutorial-font-small tutorial-stop-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.stop()"
onclick="UI.projects.education.spaces.tutorialSpace.stop()"
value="">&nbsp;&nbsp;Stop&nbsp;&nbsp;&nbsp;</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-skip-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.skip()"
onclick="UI.projects.education.spaces.tutorialSpace.skip()"
value="">&nbsp;&nbsp;Skip&nbsp;&nbsp;&nbsp;</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-previous-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.previous()" value="">Previous</label>
onclick="UI.projects.education.spaces.tutorialSpace.previous()" value="">Previous</label>
</td>
<td align="center">
<label class="tutorial-font-small tutorial-next-button"
onclick="UI.projects.superalgos.spaces.tutorialSpace.next()"
onclick="UI.projects.education.spaces.tutorialSpace.next()"
value="">&nbsp;&nbsp;Next&nbsp;&nbsp;&nbsp;</label>
</td>
</tr>
@@ -102,94 +102,94 @@
<div id="menu" class="docs-menu-table">
<div class="menu-row">
<div class="menu-item" onClick="window.contextMenu.editParagraph()">
<img src="Icons/Superalgos/Docs/docs-action-edit-paragraph.png" class="menu-img" title="Edit">
<img src="Icons/Foundations/Docs/docs-action-edit-paragraph.png" class="menu-img" title="Edit">
</div>
<div class="menu-item" onClick="window.contextMenu.toTitle()">
<img src="Icons/Superalgos/Docs/docs-title-style.png" class="menu-img" title="Title">
<img src="Icons/Foundations/Docs/docs-title-style.png" class="menu-img" title="Title">
</div>
<div class="menu-item" onClick="window.contextMenu.toSubtitle()">
<img src="Icons/Superalgos/Docs/docs-subtitle-style.png" class="menu-img" title="Subtitle">
<img src="Icons/Foundations/Docs/docs-subtitle-style.png" class="menu-img" title="Subtitle">
</div>
<div class="menu-item" onClick="window.contextMenu.toNote()">
<img src="Icons/Superalgos/Docs/docs-note-style.png" class="menu-img" title="Note">
<img src="Icons/Foundations/Docs/docs-note-style.png" class="menu-img" title="Note">
</div>
<div class="menu-item" onClick="window.contextMenu.toJavascript()">
<img src="Icons/Superalgos/Docs/docs-js-code-style.png" class="menu-img" title="Javascript">
<img src="Icons/Foundations/Docs/docs-js-code-style.png" class="menu-img" title="Javascript">
</div>
<div class="menu-item" onClick="window.contextMenu.toYouTubeVideo()">
<img src="Icons/Superalgos/Docs/docs-youtube-video-style.png" class="menu-img" title="Youtube">
<img src="Icons/Foundations/Docs/docs-youtube-video-style.png" class="menu-img" title="Youtube">
</div>
<div class="menu-item" onClick="window.contextMenu.toBlock()">
<img src="Icons/Superalgos/Docs/docs-block-style.png" class="menu-img" title="Block">
<img src="Icons/Foundations/Docs/docs-block-style.png" class="menu-img" title="Block">
</div>
</div>
<div class="menu-row">
<div class="menu-item" onClick="window.contextMenu.copyLink()">
<img src="Icons/Superalgos/Docs/docs-action-copy-to-clipboard.png" class="menu-img" title="Copy">
<img src="Icons/Foundations/Docs/docs-action-copy-to-clipboard.png" class="menu-img" title="Copy">
</div>
<div class="menu-item" onClick="window.contextMenu.toText()">
<img src="Icons/Superalgos/Docs/docs-text-style.png" class="menu-img" title="Text">
<img src="Icons/Foundations/Docs/docs-text-style.png" class="menu-img" title="Text">
</div>
<div class="menu-item" onClick="window.contextMenu.toList()">
<img src="Icons/Superalgos/Docs/docs-list-style.png" class="menu-img" title="List">
<img src="Icons/Foundations/Docs/docs-list-style.png" class="menu-img" title="List">
</div>
<div class="menu-item" onClick="window.contextMenu.toSuccess()">
<img src="Icons/Superalgos/Docs/docs-success-style.png" class="menu-img" title="Success">
<img src="Icons/Foundations/Docs/docs-success-style.png" class="menu-img" title="Success">
</div>
<div class="menu-item" onClick="window.contextMenu.toJson()">
<img src="Icons/Superalgos/Docs/docs-json-code-style.png" class="menu-img" title="Json">
<img src="Icons/Foundations/Docs/docs-json-code-style.png" class="menu-img" title="Json">
</div>
<div class="menu-item" onClick="window.contextMenu.toGif()">
<img src="Icons/Superalgos/Docs/docs-gif-style.png" class="menu-img" title="Gif">
<img src="Icons/Foundations/Docs/docs-gif-style.png" class="menu-img" title="Gif">
</div>
<div class="menu-item" onClick="window.contextMenu.toInclude()">
<img src="Icons/Superalgos/Docs/docs-include-style.png" class="menu-img" title="Include">
<img src="Icons/Foundations/Docs/docs-include-style.png" class="menu-img" title="Include">
</div>
</div>
<div class="menu-row">
<div class="menu-item" onClick="window.contextMenu.toPlaceholder()">
<img src="Icons/Superalgos/Docs/docs-placeholder-style.png" class="menu-img" title="Placeholder">
<img src="Icons/Foundations/Docs/docs-placeholder-style.png" class="menu-img" title="Placeholder">
</div>
<div class="menu-item" onClick="window.contextMenu.toSummary()">
<img src="Icons/Superalgos/Docs/docs-summary-style.png" class="menu-img" title="Summary">
<img src="Icons/Foundations/Docs/docs-summary-style.png" class="menu-img" title="Summary">
</div>
<div class="menu-item" onClick="window.contextMenu.toCallout()">
<img src="Icons/Superalgos/Docs/docs-callout-style.png" class="menu-img" title="Callout">
<img src="Icons/Foundations/Docs/docs-callout-style.png" class="menu-img" title="Callout">
</div>
<div class="menu-item" onClick="window.contextMenu.toImportant()">
<img src="Icons/Superalgos/Docs/docs-important-style.png" class="menu-img" title="Important">
<img src="Icons/Foundations/Docs/docs-important-style.png" class="menu-img" title="Important">
</div>
<div class="menu-item" onClick="window.contextMenu.toTable()">
<img src="Icons/Superalgos/Docs/docs-table-style.png" class="menu-img" title="Table">
<img src="Icons/Foundations/Docs/docs-table-style.png" class="menu-img" title="Table">
</div>
<div class="menu-item" onClick="window.contextMenu.toPng()">
<img src="Icons/Superalgos/Docs/docs-png-style.png" class="menu-img" title="Png">
<img src="Icons/Foundations/Docs/docs-png-style.png" class="menu-img" title="Png">
</div>
<div class="menu-item" onClick="window.contextMenu.toSection()">
<img src="Icons/Superalgos/Docs/docs-section-style.png" class="menu-img" title="Section">
<img src="Icons/Foundations/Docs/docs-section-style.png" class="menu-img" title="Section">
</div>
</div>
<div class="menu-row">
<div class="menu-item" onClick="window.contextMenu.deleteParagraph()">
<img src="Icons/Superalgos/Docs/docs-action-delete-paragraph.png" class="menu-img" title="Delete">
<img src="Icons/Foundations/Docs/docs-action-delete-paragraph.png" class="menu-img" title="Delete">
</div>
<div class="menu-item" onClick="window.contextMenu.toWebPageLink()">
<img src="Icons/Superalgos/Docs/docs-web-page-link-style.png" class="menu-img" title="Link">
<img src="Icons/Foundations/Docs/docs-web-page-link-style.png" class="menu-img" title="Link">
</div>
<div class="menu-item" onClick="window.contextMenu.toAnchor()">
<img src="Icons/Superalgos/Docs/docs-anchor-style.png" class="menu-img" title="Anchor">
<img src="Icons/Foundations/Docs/docs-anchor-style.png" class="menu-img" title="Anchor">
</div>
<div class="menu-item" onClick="window.contextMenu.toWarning()">
<img src="Icons/Superalgos/Docs/docs-warning-style.png" class="menu-img" title="Warning">
<img src="Icons/Foundations/Docs/docs-warning-style.png" class="menu-img" title="Warning">
</div>
<div class="menu-item" onClick="window.contextMenu.toHierarchy()">
<img src="Icons/Superalgos/Docs/docs-hierarchy-style.png" class="menu-img" title="Hierarchy">
<img src="Icons/Foundations/Docs/docs-hierarchy-style.png" class="menu-img" title="Hierarchy">
</div>
<div class="menu-item" onClick="window.contextMenu.toError()">
<img src="Icons/Superalgos/Docs/docs-error-style.png" class="menu-img" title="Error">
<img src="Icons/Foundations/Docs/docs-error-style.png" class="menu-img" title="Error">
</div>
<div class="menu-item" onClick="window.contextMenu.toChapter()">
<img src="Icons/Superalgos/Docs/docs-chapter-style.png" class="menu-img" title="Chapter">
<img src="Icons/Foundations/Docs/docs-chapter-style.png" class="menu-img" title="Chapter">
</div>
</div>
</div>
+4 -4
View File
@@ -651,7 +651,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
if (error !== undefined) {
let docs = {
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'App Error - Contribution Not Sent',
anchor: undefined,
@@ -666,7 +666,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
if (error !== undefined) {
let docs = {
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'App Error - Contribution Not Sent',
anchor: undefined,
@@ -779,7 +779,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
} else {
let docs = {
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'App Error - Update Failed',
anchor: undefined,
@@ -842,7 +842,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} else {
let docs = {
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'Switching Branches - Current Branch Not Changed',
anchor: undefined,
+1 -1
View File
@@ -12,7 +12,7 @@ exports.newEnvironment = function () {
PATH_TO_UI: './UI',
PATH_TO_DATA_FILES: './UI/Data-Files/src',
PATH_TO_CLIENT: './Client/',
PATH_TO_DEFAULT_WORKSPACE: './Projects/Superalgos/Plugins/Workspaces',
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
PATH_TO_MY_WORKSPACES: './My-Workspaces',
PATH_TO_FONTS: './Client/WebServer/Fonts'
}
+1 -1
View File
@@ -49,7 +49,7 @@ if (os.platform() == "win32") {
let version = os.version();
if (version.includes("Ubuntu")) {
// Paths and Icon for Ubuntu shortcuts
let icon = path.join( __dirname,"..", "/Projects/Superalgos/Icons/superalgos.png");
let icon = path.join( __dirname,"..", "/Projects/Foundations/Icons/superalgos.png");
// Create .desktop shortcut file
fs.writeFileSync( `${name}.desktop`,
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -36,7 +36,7 @@
"config": true
},
"initialValues": {
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Superalgos\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Superalgos\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Superalgos\",\"category\": \"\",\"type\": \"\"}}}"
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Foundations\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Foundations\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Foundations\",\"category\": \"\",\"type\": \"\"}}}"
},
"referencingRules": {
"compatibleTypes": "->*Any Node*->",
@@ -48,7 +48,7 @@
"config": true
},
"initialValues": {
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Superalgos\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Superalgos\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Superalgos\",\"category\": \"\",\"type\": \"\"}}}"
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Foundations\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Foundations\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Foundations\",\"category\": \"\",\"type\": \"\"}}}"
},
"referencingRules": {
"compatibleTypes": "->*Any Node*->",
@@ -57,7 +57,7 @@
"config": true
},
"initialValues": {
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Superalgos\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Superalgos\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Superalgos\",\"category\": \"\",\"type\": \"\"}}}"
"config": "{\"icon\": {\"name\": \"\",\"project\": \"Foundations\"},\"position\": \"Left\",\"slider\": \"toTop\",\"pressButton\": \"\",\"docs\": {\"project\": \"Foundations\",\"category\": \"Tutorial\",\"type\": \"\"},\"controlDocs\": {\"panel\": \"\",\"closeTutorialEditor\": false,\"page\": {\"project\": \"Foundations\",\"category\": \"\",\"type\": \"\"}}}"
},
"isTitleAllwaysVisible": true,
"isHierarchyHead": true,
@@ -107,7 +107,7 @@
},
{
"style": "Json",
"text": "\"icon\": {\n \"name\": \"balance\",\n \"project\": \"Superalgos\"\n }",
"text": "\"icon\": {\n \"name\": \"balance\",\n \"project\": \"Foundations\"\n }",
"updated": 1613840669552
},
{
@@ -200,7 +200,7 @@
},
{
"style": "Json",
"text": "\"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Scales' Best-Kept Secrets\"\n }",
"text": "\"docs\": {\n \"project\": \"Foundations\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Scales' Best-Kept Secrets\"\n }",
"updated": 1613842164831
},
{
@@ -283,7 +283,7 @@
},
{
"style": "Json",
"text": "\"controlDocs\": {\n \"panel\": \"Open\",\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Syntax Overview\",\n \"anchor\": \"Previous Property\"\n }\n }",
"text": "\"controlDocs\": {\n \"panel\": \"Open\",\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"Topic\",\n \"type\": \"Syntax Overview\",\n \"anchor\": \"Previous Property\"\n }\n }",
"updated": 1617649170254
},
{
@@ -1,4 +1,4 @@
exports.newSuperalgosUtilitiesDocsFunctions = function () {
exports.newEducationUtilitiesDocsFunctions = function () {
let thisObject = {
buildPlaceholder: buildPlaceholder
@@ -0,0 +1,26 @@
function newEducationActionSwitch() {
let thisObject = {
executeAction: executeAction,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize() {
/* Nothing to initialize since a Function Library does not hold any state. */
}
async function executeAction(action) {
switch (action.name) {
case 'Action Name': {
// Example: return UI.projects.foundations.functionLibraries.onFocus.getNodeThatIsOnFocus(action.node)
}
}
}
}
@@ -1,4 +1,4 @@
function newSuperalgosGlobalsDocs() {
function newEducationGlobalsDocs() {
let thisObject = {
NEW_PARAGRAPH_TEXT: "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository.",
DEFAULT_LANGUAGE: 'EN',
@@ -1,4 +1,4 @@
function newSuperalgosDocsCommmandInterface() {
function newFoundationsDocsCommmandInterface() {
let thisObject = {
command: undefined,
detectCommands: detectCommands,
@@ -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,36 +29,36 @@ 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('Foundations', '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'
}
/* Find the Username and Password */
let apisNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs')
let apisNode = UI.projects.foundations.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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', '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('Foundations', 'Topic', 'Docs Message - Deleting Done')
}
}
}
@@ -1,4 +1,4 @@
function newSuperalgosDocsContextMenu() {
function newFoundationsDocsContextMenu() {
let thisObject = {
selectedParagraph: undefined,
getSelection: getSelection,
@@ -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: {
@@ -265,16 +265,16 @@ function newSuperalgosDocsContextMenu() {
}
}
UI.projects.superalgos.utilities.clipboard.copyTextToClipboard(clipboard)
UI.projects.foundations.utilities.clipboard.copyTextToClipboard(clipboard)
removeContextMenuFromScreen()
}
function replaceStyle(docSchemaParagraph, style) {
if (docSchemaParagraph.style !== style) {
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
docSchemaParagraph.style = style
removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.documentPage.render()
UI.projects.education.spaces.docsSpace.documentPage.render()
}
}
}
@@ -313,7 +313,7 @@ function newSuperalgosDocsContextMenu() {
/*
Get the dimenssions of the current paragraph to help us to define the dimenssions of the text area.
*/
UI.projects.superalgos.spaces.docsSpace.contextMenu.selectedParagraph = paragraphNode
UI.projects.education.spaces.docsSpace.contextMenu.selectedParagraph = paragraphNode
selectedParagraphHeight = paragraphNode.getClientRects()[0].height
if (selectedParagraphHeight < 30) { selectedParagraphHeight = 30 }
/*
@@ -393,19 +393,19 @@ function newSuperalgosDocsContextMenu() {
return true
}
if (paragraphNode.id.indexOf('-table') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseTable(paragraphNode)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseTable(paragraphNode)
return true
}
if (paragraphNode.id.indexOf('-hierarchy') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseHierarchy(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseHierarchy(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-gif') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseGIF(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseGIF(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-png') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParsePNG(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParsePNG(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-javascript') >= 0) {
@@ -449,11 +449,11 @@ function newSuperalgosDocsContextMenu() {
return true
}
if (paragraphNode.id.indexOf('-link') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseLink(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseLink(paragraphNode.innerHTML)
return true
}
if (paragraphNode.id.indexOf('-youtube') >= 0) {
selectedParagraphData = UI.projects.superalgos.utilities.docs.reverseParseYoutube(paragraphNode.innerHTML)
selectedParagraphData = UI.projects.education.utilities.docs.reverseParseYoutube(paragraphNode.innerHTML)
return true
}
}
@@ -1,4 +1,4 @@
function newSuperalgosDocSpace() {
function newEducationDocSpace() {
const MODULE_NAME = 'Doc Space'
let thisObject = {
isVisible: undefined,
@@ -65,13 +65,13 @@ function newSuperalgosDocSpace() {
setupActiveBranch()
setupContributionsBranch()
thisObject.searchEngine = newSuperalgosDocsSearchEngine()
thisObject.mainSearchPage = newSuperalgosDocsMainSearchPage()
thisObject.searchResultsPage = newSuperalgosDocsSearchResultsPage()
thisObject.documentPage = newSuperalgosDocsDocumentPage()
thisObject.footer = newSuperalgosDocsFooter()
thisObject.commandInterface = newSuperalgosDocsCommmandInterface()
thisObject.contextMenu = newSuperalgosDocsContextMenu()
thisObject.searchEngine = newFoundationsDocsSearchEngine()
thisObject.mainSearchPage = newFoundationsDocsMainSearchPage()
thisObject.searchResultsPage = newFoundationsDocsSearchResultsPage()
thisObject.documentPage = newFoundationsDocsDocumentPage()
thisObject.footer = newFoundationsDocsFooter()
thisObject.commandInterface = newFoundationsDocsCommmandInterface()
thisObject.contextMenu = newFoundationsDocsContextMenu()
thisObject.searchEngine.initialize()
thisObject.mainSearchPage.initialize()
@@ -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('Foundations', '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('Foundations', '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,21 +210,21 @@ 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('Foundations', '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('Foundations', '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
UI.projects.superalgos.utilities.clipboard.copyTextToClipboard(clipboard)
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.foundations.utilities.clipboard.copyTextToClipboard(clipboard)
}
function onKeyDown(event) {
@@ -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
@@ -1,4 +1,4 @@
function newSuperalgosDocsDocumentPage() {
function newFoundationsDocsDocumentPage() {
let thisObject = {
docsSchemaDocument: undefined,
exitEditMode: exitEditMode,
@@ -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') {
node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(thisObject.docsSchemaDocument.nodeId)
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Workspace') {
node = await UI.projects.foundations.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.foundations.spaces.designSpace.workspace.getNodeById(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.nodeId)
}
if (node === undefined) { return }
@@ -125,8 +125,8 @@ 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
UI.projects.superalgos.spaces.floatingSpace.positionAtNode(node, xOffset)
let xOffset = -UI.projects.education.globals.docs.DOCS_SPACE_WIDTH / 2
UI.projects.foundations.spaces.floatingSpace.positionAtNode(node, xOffset)
}
}
@@ -139,7 +139,7 @@ function newSuperalgosDocsDocumentPage() {
let HTML = ''
HTML = HTML + '<section id="docs-search-results-div" class="docs-search-page-container">'
HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + '</section>'
HTML = HTML + '<div id="docs-common-style-container-div" class="docs-common-style-container">' // Common Style Container Starts
@@ -147,7 +147,7 @@ function newSuperalgosDocsDocumentPage() {
/* Title */
let titleLabel = thisObject.docsSchemaDocument.type
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
if (thisObject.docsSchemaDocument.deleted === true) {
let key = 'auto-generated-flag-paragraph'
@@ -167,7 +167,7 @@ function newSuperalgosDocsDocumentPage() {
}
}
addDefinitionTable(thisObject.docsSchemaDocument, 'definition-editable-', UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
addDefinitionTable(thisObject.docsSchemaDocument, 'definition-editable-', UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
let editableParagraphIndex = 0
let autoGeneratedParagraphIndex = 0
@@ -184,10 +184,10 @@ function newSuperalgosDocsDocumentPage() {
Here we inject the HTML we built into the DOM at the Docs Space Div.
*/
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
hightlightEmbeddedCode()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
/*
After generating the html, we will add the images at all the points we know
@@ -196,10 +196,10 @@ function newSuperalgosDocsDocumentPage() {
addImages()
function generateNavigationAndTableOfContents() {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTopicPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
thisObject.docsSchemaDocument.topic
)
@@ -207,7 +207,7 @@ function newSuperalgosDocsDocumentPage() {
/* Topic Title
titleLabel = thisObject.docsSchemaDocument.topic + ' Topic Navigation'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateTopicPreviousAndNextPageNavigation()
@@ -223,17 +223,17 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '</div>' // END Container for Topic Navigation
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTutorialPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
thisObject.docsSchemaDocument.tutorial
)
/* Tutorial Title
titleLabel = thisObject.docsSchemaDocument.tutorial + ' Tutorial Navigation'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateTutorialPreviousAndNextPageNavigation()
@@ -249,17 +249,17 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '</div>' // END Container for Tutorial Navigation
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Review') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Review') {
orderedReviewPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedReviewPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Review',
thisObject.docsSchemaDocument.review
)
/* Review Title
titleLabel = thisObject.docsSchemaDocument.review + ' Review Navigation'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
HTML = HTML + '<div id="docs-main-title-div" class="docs-title-table"><div class="docs-table-cell"><h2 class="docs-h2" id="' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type.toLowerCase().replace(' ', '-') + '" > ' + titleLabel + '</h2></div><div id="projectImageDiv" class="docs-image-container"/></div></div>'
*/
generateReviewPreviousAndNextPageNavigation()
@@ -283,15 +283,15 @@ 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
if (docsSchemaDocument.definition.icon !== undefined) {
testElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(docsSchemaDocument.definition.icon.project, docsSchemaDocument.definition.icon.name)
testElement = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(docsSchemaDocument.definition.icon.project, docsSchemaDocument.definition.icon.name)
} else {
testElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(project, type)
testElement = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(project, type)
}
/*
@@ -300,7 +300,7 @@ function newSuperalgosDocsDocumentPage() {
image we use a table, otherwise we will render the definitaion as a Summary.
*/
if ((category === 'Topic' || category === 'Tutorial' || category === 'Review' || category === 'Concept' || category === 'Book') && testElement === undefined) {
HTML = HTML + '<div id="definition-summary-editable-paragraph" class="docs-summary"><b>Summary:</b> ' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</div>'
HTML = HTML + '<div id="definition-summary-editable-paragraph" class="docs-summary"><b>Summary:</b> ' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</div>'
} else {
HTML = HTML + '<div class="docs-definition-table">'
@@ -314,7 +314,7 @@ function newSuperalgosDocsDocumentPage() {
definitionImagesArray.push(imageItem)
HTML = HTML + '<div id="' + imageItem.div + '" class="docs-image-container"></div>'
HTML = HTML + '<div id="' + idPrefix + 'paragraph" class="docs-definition-text"><strong>' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</strong></div>'
HTML = HTML + '<div id="' + idPrefix + 'paragraph" class="docs-definition-text"><strong>' + UI.projects.education.utilities.docs.addToolTips(definitionText, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</strong></div>'
HTML = HTML + '</div>'
}
@@ -333,11 +333,11 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '<div class="docs-topic-navigation"><div>'
if (previousPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
HTML = HTML + '</div><div>'
if (nextPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -361,7 +361,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Topic' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -379,11 +379,11 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '<div class="docs-topic-navigation"><div>'
if (previousPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
HTML = HTML + '</div><div>'
if (nextPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -407,7 +407,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Tutorial' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -424,11 +424,11 @@ function newSuperalgosDocsDocumentPage() {
HTML = HTML + '<div class="docs-topic-navigation"><div>'
if (previousPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + previousPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Previous </button></span><br/>' + previousPage.type
}
HTML = HTML + '</div><div>'
if (nextPage !== undefined) {
HTML = HTML + '<span" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
HTML = HTML + '<span" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + nextPage.type.replace(/'/g, 'AMPERSAND') + '\')"><button> Next </button></span><br/>' + nextPage.type
}
HTML = HTML + '</div></div>'
return
@@ -452,7 +452,7 @@ function newSuperalgosDocsDocumentPage() {
text: "" + arrayItem.type + ""
}
autoGeneratedParagraphIndex++
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
HTML = HTML + '<p>' + arrayItem.pageNumber + '. ' + '<a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project + '\', \'' + 'Review' + '\', \'' + arrayItem.type.replace(/'/g, 'AMPERSAND') + '\')">' + paragraph.text + '</a></p>'
}
}
@@ -516,7 +516,7 @@ function newSuperalgosDocsDocumentPage() {
}
}
}
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
autoGeneratedHtml()
}
HTML = HTML + '</div>' // Content Ends
@@ -615,8 +615,8 @@ function newSuperalgosDocsDocumentPage() {
}
function addPlaceholdedParagraph(propertyName) {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.placeholder !== undefined) {
let placeholder = UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.placeholder[propertyName]
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.placeholder !== undefined) {
let placeholder = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.placeholder[propertyName]
if (placeholder !== undefined) {
let paragraph = {
@@ -657,8 +657,8 @@ function newSuperalgosDocsDocumentPage() {
switch (category) {
case 'Topic': {
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTopicPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
chapterName
)
@@ -669,8 +669,8 @@ function newSuperalgosDocsDocumentPage() {
break
}
case 'Tutorial': {
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedTutorialPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
chapterName
)
@@ -681,8 +681,8 @@ function newSuperalgosDocsDocumentPage() {
break
}
case 'Review': {
orderedReviewPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
orderedReviewPageIndexArray = UI.projects.education.utilities.docs.buildOrderedPageIndex(
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project,
'Review',
chapterName
)
@@ -745,7 +745,7 @@ function newSuperalgosDocsDocumentPage() {
addDefinitionImage()
addHierarchyImages()
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.category === 'Node') {
addMenuItemsImages()
addChildrenNodesPropertiesImages()
addAttachingAndReferencingRulesImages()
@@ -765,7 +765,7 @@ function newSuperalgosDocsDocumentPage() {
equal to the Node Type.
*/
let imageName = appSchemaDocument.type.toLowerCase().replaceAll(' ', '-')
imageElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageName)
imageElement = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageName)
if (imageElement === undefined) {
console.log('[WARN] Image for project (' + imageItem.project + ') with name (' + imageName + ') not found. As a consequence, the Docs Page will be rendered without the icon. ')
continue
@@ -773,14 +773,14 @@ function newSuperalgosDocsDocumentPage() {
} else {
if (imageItem.icon === undefined) {
/* This is the default behavious */
imageElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(imageItem.project, imageItem.type)
imageElement = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(imageItem.project, imageItem.type)
if (imageElement === undefined) {
console.log('[WARN] Image for project (' + imageItem.project + ') with name (' + imageItem.type + ') not found. As a consequence, the Docs Page will be rendered without the icon. ')
continue
}
} else {
/* Here we take the image from the icon specification */
imageElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(imageItem.icon.project, imageItem.icon.name)
imageElement = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(imageItem.icon.project, imageItem.icon.name)
if (imageElement === undefined) {
console.log('[WARN] Image for project (' + imageItem.icon.project + ') with name (' + imageItem.icon.name + ') not found. As a consequence, the Docs Page will be rendered without the icon. ')
continue
@@ -805,20 +805,20 @@ function newSuperalgosDocsDocumentPage() {
let appSchemaDocument = SCHEMAS_BY_PROJECT.get(imageItem.project).map.appSchema.get(imageItem.type)
if (appSchemaDocument.icon === undefined) {
let imageName = appSchemaDocument.type.toLowerCase().replaceAll(' ', '-')
collectionImage = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageName)
collectionImage = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageName)
if (collectionImage === undefined) {
console.log('[WARN] Image for project (' + imageItem.project + ') with name (' + imageName + ') not found. As a consequence, the hierarchy will be rendered without the icon. ')
continue
}
} else {
collectionImage = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(imageItem.project, imageItem.type)
collectionImage = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(imageItem.project, imageItem.type)
if (collectionImage === undefined) {
console.log('[WARN] Image for project (' + imageItem.project + ') with type (' + imageItem.type + ') not found. As a consequence, the hierarchy will be rendered without the icon. ')
continue
}
}
} else {
collectionImage = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageItem.name)
collectionImage = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(imageItem.project, imageItem.name)
if (collectionImage === undefined) {
console.log('[WARN] Image for project (' + imageItem.project + ') with name (' + imageItem.name + ') not found. As a consequence, the hierarchy will be rendered without the icon. ')
continue
@@ -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.foundations.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, imageName)
imageElement.width = "50"
imageElement.height = "50"
@@ -868,12 +868,12 @@ 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.foundations.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.foundations.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.iconPathOn)
} else {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName('Superalgos', 'bitcoin')
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'bitcoin')
}
}
}
@@ -898,9 +898,9 @@ function newSuperalgosDocsDocumentPage() {
function getIcon() {
if (childrenNodesProperty.project !== undefined) {
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(childrenNodesProperty.project, childrenNodesProperty.childType)
return UI.projects.foundations.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.foundations.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, childrenNodesProperty.childType)
}
}
}
@@ -948,11 +948,11 @@ 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.foundations.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, listItem)
} else {
let project = splittedListItem[0]
let nodeType = splittedListItem[1]
return UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(project, nodeType)
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(project, nodeType)
}
}
}
@@ -976,7 +976,7 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < imageArray.length; i++) {
let dummyImage = imageArray[i]
let parentElement = dummyImage.parentNode
let collectionImage = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName('Superalgos', 'configuration')
let collectionImage = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'configuration')
if (collectionImage === undefined) {
continue
}
@@ -1073,9 +1073,9 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < appSchemaDocument.childrenNodesProperties.length; i++) {
let childrenNodesProperty = appSchemaDocument.childrenNodesProperties[i]
let name = UI.projects.superalgos.utilities.strings.fromCamelCaseToUpperWithSpaces(childrenNodesProperty.name)
let name = UI.projects.foundations.utilities.strings.fromCamelCaseToUpperWithSpaces(childrenNodesProperty.name)
HTML = HTML + '<button id="docs-children-nodes-property-' + i + '" type="button" class="docs-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(name, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-children-nodes-property-' + i + '" type="button" class="docs-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(name, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<div class="docs-collapsible-content">'
paragraph = {
@@ -1148,7 +1148,7 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < nodeList.length; i++) {
let listItem = nodeList[i]
if (listItem === "") { continue }
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(listItem, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(listItem, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
}
}
}
@@ -1203,7 +1203,7 @@ function newSuperalgosDocsDocumentPage() {
for (let i = 0; i < nodeList.length; i++) {
let listItem = nodeList[i]
if (listItem === "") { continue }
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.superalgos.utilities.docs.addToolTips(listItem, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
HTML = HTML + '<button id="docs-' + additionToKey + '-' + i + '" type="button" class="docs-non-collapsible-element"><img>' + UI.projects.education.utilities.docs.addToolTips(listItem, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</button>'
}
}
}
@@ -1256,12 +1256,12 @@ function newSuperalgosDocsDocumentPage() {
they are using and sample values for each one.
*/
/* First Step: get an array of all the nodes in the workspace of this type */
let rootNodes = UI.projects.superalgos.spaces.designSpace.workspace.workspaceNode.rootNodes
let rootNodes = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
let allNodesFound = []
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -1288,7 +1288,7 @@ function newSuperalgosDocsDocumentPage() {
propertyMap.forEach(displayProperty)
function displayProperty(valueArray, mapKey, map) {
let name = UI.projects.superalgos.utilities.strings.fromCamelCaseToUpperWithSpaces(mapKey)
let name = UI.projects.foundations.utilities.strings.fromCamelCaseToUpperWithSpaces(mapKey)
HTML = HTML + '<button id="docs-config-property-' + mapKey.toLowerCase() + '" type="button" class="docs-collapsible-element"><img class="docs-configuration-property-image">' + name + '</button>'
HTML = HTML + '<div class="docs-collapsible-content">'
@@ -1367,12 +1367,12 @@ function newSuperalgosDocsDocumentPage() {
and after that, analysing their code in order to extract examples to show.
*/
/* First Step: get an array of all the nodes in the workspace of this type */
let rootNodes = UI.projects.superalgos.spaces.designSpace.workspace.workspaceNode.rootNodes
let rootNodes = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
let allNodesFound = []
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -1463,12 +1463,12 @@ function newSuperalgosDocsDocumentPage() {
and after that, analysing their code in order to extract examples to show.
*/
/* First Step: get an array of all the nodes in the workspace of this type */
let rootNodes = UI.projects.superalgos.spaces.designSpace.workspace.workspaceNode.rootNodes
let rootNodes = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
let allNodesFound = []
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -1514,13 +1514,13 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-text'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addCodeToWhiteList(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Title': {
@@ -1528,8 +1528,8 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-title'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Subtitle': {
@@ -1537,8 +1537,8 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-subtitle'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Note': {
@@ -1546,11 +1546,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-note-circle"></i> <b>Note:</b>'
role = 'role="alert"'
key = key + '-note'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Success': {
@@ -1558,11 +1558,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-check-square-o"></i> <b>Tip:</b>'
role = 'role="alert"'
key = key + '-success'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Important': {
@@ -1570,11 +1570,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Important:</b>'
role = 'role="alert"'
key = key + '-important'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Warning': {
@@ -1582,11 +1582,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Warning:</b>'
role = 'role="alert"'
key = key + '-warning'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Error': {
@@ -1594,9 +1594,9 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Error:</b>'
role = 'role="alert"'
key = key + '-error'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Callout': {
@@ -1604,11 +1604,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-callout'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Summary': {
@@ -1616,11 +1616,11 @@ function newSuperalgosDocsDocumentPage() {
prefix = '<b>Summary:</b>'
role = ''
key = key + '-summary'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Section': {
@@ -1628,9 +1628,9 @@ function newSuperalgosDocsDocumentPage() {
prefix = ''
role = ''
key = key + '-section'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'List': {
@@ -1639,25 +1639,25 @@ function newSuperalgosDocsDocumentPage() {
sufix = '</li></ul>'
role = ''
key = key + '-list'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addBold(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addCodeToCamelCase(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addBold(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addKeyboard(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = innerHTML + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
break
}
case 'Table': {
styleClass = ''
prefix = '<table class="docs-info-table">'
sufix = '</table>' + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
sufix = '</table>' + UI.projects.education.utilities.docs.addWarningIfTranslationIsOutdated(paragraph)
role = ''
key = key + '-table'
innerHTML = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.superalgos.utilities.docs.addToolTips(innerHTML, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = UI.projects.superalgos.utilities.docs.parseTable(innerHTML)
innerHTML = UI.projects.superalgos.utilities.docs.addItalics(innerHTML)
innerHTML = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
innerHTML = UI.projects.education.utilities.docs.addToolTips(innerHTML, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type)
innerHTML = UI.projects.education.utilities.docs.parseTable(innerHTML)
innerHTML = UI.projects.education.utilities.docs.addItalics(innerHTML)
break
}
case 'Hierarchy': {
@@ -1675,7 +1675,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-link'
innerHTML = UI.projects.superalgos.utilities.docs.parseLink(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseLink(paragraph.text)
break
}
case 'Youtube': {
@@ -1684,7 +1684,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-youtube'
innerHTML = UI.projects.superalgos.utilities.docs.parseYoutube(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseYoutube(paragraph.text)
break
}
case 'Gif': {
@@ -1693,7 +1693,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-gif'
innerHTML = UI.projects.superalgos.utilities.docs.parseGIF(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parseGIF(paragraph.text)
break
}
case 'Png': {
@@ -1702,7 +1702,7 @@ function newSuperalgosDocsDocumentPage() {
sufix = ''
role = ''
key = key + '-png'
innerHTML = UI.projects.superalgos.utilities.docs.parsePNG(paragraph.text)
innerHTML = UI.projects.education.utilities.docs.parsePNG(paragraph.text)
break
}
case 'Javascript': {
@@ -1767,7 +1767,7 @@ function newSuperalgosDocsDocumentPage() {
}
HTML = HTML + '<p><div id="' + key + '" ' + styleClass + ' ' + role + '>' + prefix + ' ' + innerHTML + sufix + '</div></p>'
UI.projects.superalgos.spaces.docsSpace.paragraphMap.set(key, paragraph)
UI.projects.education.spaces.docsSpace.paragraphMap.set(key, paragraph)
}
function hightlightEmbeddedCode() {
@@ -1827,7 +1827,7 @@ function newSuperalgosDocsDocumentPage() {
let imageContainer = '<div id="' + imageItem.div + '" class="docs-hierarchy-image-container"/>'
hierarchyImagesArray.push(imageItem)
let matrixValue = '<table><tr><td class="docs-hierarchy-table-cell">' + imageContainer + '</td></tr><tr><td class="docs-hierarchy-table-cell">' + UI.projects.superalgos.utilities.docs.addToolTips(schemaDocument.type, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '</td></tr></table>'
let matrixValue = '<table><tr><td class="docs-hierarchy-table-cell">' + imageContainer + '</td></tr><tr><td class="docs-hierarchy-table-cell">' + UI.projects.education.utilities.docs.addToolTips(schemaDocument.type, UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.type) + '</td></tr></table>'
let matrixRow = contentMatrix[currentRow]
matrixRow[currentColumn] = matrixValue
@@ -1902,7 +1902,7 @@ function newSuperalgosDocsDocumentPage() {
let imageItem = {
div: 'hierarchy-image-div-' + hierarchyImagesArray.length,
project: 'Superalgos'
project: 'Foundations'
}
switch (matrixRow[j]) {
@@ -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.foundations.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
}
@@ -1,4 +1,4 @@
function newSuperalgosDocsFooter() {
function newFoundationsDocsFooter() {
let thisObject = {
addFooter: addFooter,
initialize: initialize,
@@ -28,21 +28,21 @@ function newSuperalgosDocsFooter() {
HTML = HTML + '<div class="docs-footer-cell style="white-space: nowrap; overflow-x: auto;" >' // white-space: nowrap; overflow-x: auto; prevents line breaks when combined with display: inline-block;" in the child elements
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.sharePage()"><button>SHARE</button></span>'
if (UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.sharePage()"><button>SHARE</button></span>'
}
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.scrollToElement(\'docs-space-div\')"><button>TO TOP</button></span>'
if (UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.project + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.category + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.type + '\')"><button>BACK</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.scrollToElement(\'docs-space-div\')"><button>TO TOP</button></span>'
if (UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered.project + '\', \'' + UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered.category + '\', \'' + UI.projects.education.spaces.docsSpace.previousDocumentBeingRendered.type + '\')"><button>BACK</button></span>'
}
if (UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.project + '\', \'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.category + '\', \'' + UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered.type + '\')"><button>TO BOOK</button></span>'
if (UI.projects.education.spaces.docsSpace.currentBookBeingRendered !== undefined) {
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.project + '\', \'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.category + '\', \'' + UI.projects.education.spaces.docsSpace.currentBookBeingRendered.type + '\')"><button>TO BOOK</button></span>'
}
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Reviews' + '\')"><button>REVIEWS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'Community Data Mines' + '\')"><button>DATA MINES</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'First Steps Tutorials' + '\')"><button>TUTORIALS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + 'Superalgos' + '\', \'' + 'Book' + '\', \'' + 'User Manual' + '\')"><button>USER MANUAL</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Foundations' + '\', \'' + 'Book' + '\', \'' + 'Reviews' + '\')"><button>REVIEWS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Foundations' + '\', \'' + 'Book' + '\', \'' + 'Community Data Mines' + '\')"><button>DATA MINES</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Foundations' + '\', \'' + 'Book' + '\', \'' + 'First Steps Tutorials' + '\')"><button>TUTORIALS</button></span>'
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + 'Foundations' + '\', \'' + 'Book' + '\', \'' + 'User Manual' + '\')"><button>USER MANUAL</button></span>'
HTML = HTML + '</div>'
@@ -69,61 +69,61 @@ function newSuperalgosDocsFooter() {
HTML = HTML + 'We produce the original Docs in English and you get the content in your preferred language only when translations are available. When not, you get the default content, in English.'
HTML = HTML + '</div>'
let languageCode = UI.projects.superalgos.spaces.docsSpace.language
let languageCode = UI.projects.education.spaces.docsSpace.language
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Choose Your Language</h4>'
HTML = HTML + 'Click on your preferred language:<br/>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'EN\')"><img src="Images/Languages/EN.png" title="English" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'EN\')"><img src="Images/Languages/EN.png" title="English" class="docs-footer-language'
if (languageCode === 'EN') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'ES\')"><img src="Images/Languages/ES.png" title="Spanish" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'ES\')"><img src="Images/Languages/ES.png" title="Spanish" class="docs-footer-language'
if (languageCode === 'ES') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'RU\')"><img src="Images/Languages/RU.png" title="Russian" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'RU\')"><img src="Images/Languages/RU.png" title="Russian" class="docs-footer-language'
if (languageCode === 'RU') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'IT\')"><img src="Images/Languages/IT.png" title="Italian" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'IT\')"><img src="Images/Languages/IT.png" title="Italian" class="docs-footer-language'
if (languageCode === 'IT') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'DE\')"><img src="Images/Languages/DE.png" title="German" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'DE\')"><img src="Images/Languages/DE.png" title="German" class="docs-footer-language'
if (languageCode === 'DE') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'FR\')"><img src="Images/Languages/FR.png" title="French" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'FR\')"><img src="Images/Languages/FR.png" title="French" class="docs-footer-language'
if (languageCode === 'FR') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'CN\')"><img src="Images/Languages/CN.png" title="Simplified Chinese-Mandarin" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'CN\')"><img src="Images/Languages/CN.png" title="Simplified Chinese-Mandarin" class="docs-footer-language'
if (languageCode === 'CN') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'ID\')"><img src="Images/Languages/ID.png" title="Bahasa" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'ID\')"><img src="Images/Languages/ID.png" title="Bahasa" class="docs-footer-language'
if (languageCode === 'ID') {
HTML = HTML + '-selected'
}
HTML = HTML + '"></a>'
HTML = HTML + '<a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeLanguage(\'TR\')"><img src="Images/Languages/TR.png" title="Turkish" class="docs-footer-language'
HTML = HTML + '<a href="#" onClick="UI.projects.education.spaces.docsSpace.changeLanguage(\'TR\')"><img src="Images/Languages/TR.png" title="Turkish" class="docs-footer-language'
if (languageCode === 'TR') {
HTML = HTML + '-selected'
}
@@ -161,23 +161,23 @@ function newSuperalgosDocsFooter() {
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Choose the Current Branch</h4>'
HTML = HTML + 'You are currently running on the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.superalgos.spaces.docsSpace.currentBranch) + '</code> branch. Switch to:'
HTML = HTML + 'You are currently running on the <code class="docs-footer-code">' + UI.projects.foundations.utilities.gitBranches.getBranchLabel(UI.projects.education.spaces.docsSpace.currentBranch) + '</code> branch. Switch to:'
HTML = HTML + '<ul>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'master\')">Master</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeCurrentBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'master\')">Master</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeCurrentBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '</ul>'
HTML = HTML + '</div>'
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Contributions Branch</h4>'
HTML = HTML + 'You are currently contributing to the <code class="docs-footer-code">' + UI.projects.superalgos.utilities.gitBranches.getBranchLabel(UI.projects.superalgos.spaces.docsSpace.contributionsBranch) + '</code> branch. Switch to:'
HTML = HTML + 'You are currently contributing to the <code class="docs-footer-code">' + UI.projects.foundations.utilities.gitBranches.getBranchLabel(UI.projects.education.spaces.docsSpace.contributionsBranch) + '</code> branch. Switch to:'
HTML = HTML + '<ul>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'master\')">Master</code></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.superalgos.spaces.docsSpace.changeContributionsBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'master\')">Master</code></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'develop\')">Develop</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'plugins-docs\')">Plugins-Docs</a></li>'
HTML = HTML + '<li><a href="#" onClick="UI.projects.education.spaces.docsSpace.changeContributionsBranch(\'next-version\')">Next-Version</a></li>'
HTML = HTML + '</ul>'
HTML = HTML + '</ul>'
@@ -1,4 +1,4 @@
function newSuperalgosDocsMainSearchPage() {
function newFoundationsDocsMainSearchPage() {
let thisObject = {
addSearchHeader: addSearchHeader,
detectEnterOnSearchBox: detectEnterOnSearchBox,
@@ -25,10 +25,10 @@ function newSuperalgosDocsMainSearchPage() {
HTML = HTML + '<center><div class="docs-font-normal docs-search-box"><input class="docs-search-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input></div></center>'
HTML = HTML + '</div>'
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
}
function addSearchHeader() {
@@ -46,17 +46,17 @@ function newSuperalgosDocsMainSearchPage() {
function detectEnterOnSearchBox() {
const element = document.getElementsByClassName("docs-search-input")[0]
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command !== undefined) {
element.value = UI.projects.superalgos.spaces.docsSpace.commandInterface.command
if (UI.projects.education.spaces.docsSpace.commandInterface.command !== undefined) {
element.value = UI.projects.education.spaces.docsSpace.commandInterface.command
}
element.addEventListener("keyup", function (event) {
if (event.key === "Enter" || event.keyCode === 13) {
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = undefined
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = undefined
UI.projects.superalgos.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
UI.projects.superalgos.spaces.docsSpace.commandInterface.command = element.value.trim()
UI.projects.superalgos.spaces.docsSpace.commandInterface.detectCommands()
UI.projects.education.spaces.docsSpace.exitEditMode()
UI.projects.education.spaces.docsSpace.currentBookBeingRendered = undefined
UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered = undefined
UI.projects.education.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
UI.projects.education.spaces.docsSpace.commandInterface.command = element.value.trim()
UI.projects.education.spaces.docsSpace.commandInterface.detectCommands()
}
});
}
@@ -1,4 +1,4 @@
function newSuperalgosDocsSearchEngine() {
function newFoundationsDocsSearchEngine() {
let thisObject = {
docsIndex: undefined,
setUpSearchEngine: setUpSearchEngine,
@@ -21,10 +21,10 @@ function newSuperalgosDocsSearchEngine() {
/*
This is a way to avoid indexing the docs, if the user does not want to.
*/
let docsSpaceNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
if (docsSpaceNode !== undefined) {
if (docsSpaceNode.spaceSettings !== undefined) {
let indexContent = UI.projects.superalgos.utilities.nodeConfig.loadPropertyFromNodeConfig(docsSpaceNode.spaceSettings.payload, 'indexContent')
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadPropertyFromNodeConfig(docsSpaceNode.spaceSettings.payload, 'indexContent')
if (indexContent === false) {
callbackFunction()
return
@@ -243,7 +243,7 @@ function newSuperalgosDocsSearchEngine() {
documentIndex.phraseCount[style] = stylePhraseCount
}
text = UI.projects.superalgos.utilities.strings.replaceSpecialCharactersForSpaces(text)
text = UI.projects.foundations.utilities.strings.replaceSpecialCharactersForSpaces(text)
let splittedText = text.split(' ')
@@ -257,7 +257,7 @@ function newSuperalgosDocsSearchEngine() {
} else {
phrase = phrase + ' ' + word
}
let key = UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(phrase)
let key = UI.projects.foundations.utilities.strings.cleanTextOfCommonWordEndings(phrase)
let thisPhraseCount = stylePhraseCount.get(key)
if (thisPhraseCount === undefined) { thisPhraseCount = 0 }
@@ -275,12 +275,12 @@ function newSuperalgosDocsSearchEngine() {
/*
We will scan the whole workspace and create an array with all of its nodes.
*/
let rootNodes = UI.projects.superalgos.spaces.designSpace.workspace.workspaceNode.rootNodes
let rootNodes = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
let allNodesFound = []
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(rootNode)
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -296,7 +296,7 @@ function newSuperalgosDocsSearchEngine() {
let node = allNodesFound[i]
if (node.project === project) {
let nodeNameTypePath = UI.projects.superalgos.utilities.hierarchy.getNodeNameTypePath(node)
let nodeNameTypePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(node)
let docsSchemaDocument = {
nodeId: node.id,
@@ -1,4 +1,4 @@
function newSuperalgosDocsSearchResultsPage() {
function newFoundationsDocsSearchResultsPage() {
let thisObject = {
render: render,
initialize: initialize,
@@ -23,34 +23,34 @@ 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.foundations.utilities.strings.cleanTextOfCommonWordEndings(UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase())
let thisPhraseCount = documentIndex.phraseCount[style].get(key)
if (thisPhraseCount === undefined) {
thisPhraseCount = 0
}
if (documentIndex.docsSchemaDocument.type !== undefined) {
if (key === UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.type.toLowerCase())) {
if (key === UI.projects.foundations.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.type.toLowerCase())) {
documentPoints = documentPoints + thisPhraseCount * 100
}
}
if (documentIndex.docsSchemaDocument.topic !== undefined) {
if (key === UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.topic.toLowerCase())) {
if (key === UI.projects.foundations.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.topic.toLowerCase())) {
documentPoints = documentPoints + thisPhraseCount * 200
}
}
if (documentIndex.docsSchemaDocument.tutorial !== undefined) {
if (key === UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.tutorial.toLowerCase())) {
if (key === UI.projects.foundations.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.tutorial.toLowerCase())) {
documentPoints = documentPoints + thisPhraseCount * 200
}
}
if (documentIndex.docsSchemaDocument.review !== undefined) {
if (key === UI.projects.superalgos.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.review.toLowerCase())) {
if (key === UI.projects.foundations.utilities.strings.cleanTextOfCommonWordEndings(documentIndex.docsSchemaDocument.review.toLowerCase())) {
documentPoints = documentPoints + thisPhraseCount * 200
}
}
@@ -210,7 +210,7 @@ function newSuperalgosDocsSearchResultsPage() {
const tabs = ['All', 'Nodes', 'Concepts', 'Topics', 'Tutorials', 'Reviews', 'Books', 'Workspace']
let HTML = ''
HTML = HTML + '<section id="docs-search-results-div" class="docs-search-page-container">'
HTML = HTML + UI.projects.superalgos.spaces.docsSpace.mainSearchPage.addSearchHeader()
HTML = HTML + UI.projects.education.spaces.docsSpace.mainSearchPage.addSearchHeader()
// Tabs
HTML = HTML + '<div class="docs-search-results-header-tabs-container">'
@@ -251,7 +251,7 @@ function newSuperalgosDocsSearchResultsPage() {
let nodeType = pathStep[1]
let nodeProject = pathStep[2]
let nodeId = pathStep[3]
let link = ' > <a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + nodeProject + '\', \'' + result.documentIndex.category + '\', \'' + nodeType.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + nodeId + '\')" class="docs-search-result-content-record-project-category-link">'
let link = ' > <a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + nodeProject + '\', \'' + result.documentIndex.category + '\', \'' + nodeType.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + nodeId + '\')" class="docs-search-result-content-record-project-category-link">'
if (nodeName === 'New ' + nodeType || nodeName === 'My ' + nodeType || nodeName === undefined) {
nodeName = ''
}
@@ -289,10 +289,10 @@ function newSuperalgosDocsSearchResultsPage() {
mainLink = result.documentIndex.docsSchemaDocument.type
}
}
HTML = HTML + '<p><a onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + result.documentIndex.project + '\', \'' + result.documentIndex.category + '\', \'' + result.documentIndex.docsSchemaDocument.type.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + result.documentIndex.docsSchemaDocument.nodeId + '\')" class="docs-search-result-content-record-title">' + mainLink + '</a></p>'
HTML = HTML + '<p><a onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'' + result.documentIndex.project + '\', \'' + result.documentIndex.category + '\', \'' + result.documentIndex.docsSchemaDocument.type.replace(/'/g, 'AMPERSAND') + '\', ' + undefined + ' ,\'' + result.documentIndex.docsSchemaDocument.nodeId + '\')" class="docs-search-result-content-record-title">' + mainLink + '</a></p>'
if (result.documentIndex.docsSchemaDocument.definition !== undefined) {
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '</p>'
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + UI.projects.education.utilities.docs.getTextBasedOnLanguage(result.documentIndex.docsSchemaDocument.definition) + '</p>'
} else {
HTML = HTML + '<p class="docs-search-result-content-record-extract">' + 'No definition available.' + '</p>'
}
@@ -320,10 +320,10 @@ function newSuperalgosDocsSearchResultsPage() {
}
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.superalgos.spaces.docsSpace.footer.addFooter()
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.superalgos.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
UI.projects.education.spaces.docsSpace.mainSearchPage.setFocusOnSearchBox()
}
}
}
@@ -1,4 +1,4 @@
function newSuperalgosTutorialSpace() {
function newEducationTutorialSpace() {
const MODULE_NAME = 'Tutorial Space'
let thisObject = {
stop: stop,
@@ -170,10 +170,10 @@ function newSuperalgosTutorialSpace() {
config.toggleMapView !== undefined
) {
if (config.toggleMapView.view === "On") {
UI.projects.superalgos.spaces.floatingSpace.inMapMode = true
UI.projects.foundations.spaces.floatingSpace.inMapMode = true
} else
if (config.toggleMapView.view === "Off") {
UI.projects.superalgos.spaces.floatingSpace.inMapMode = false
UI.projects.foundations.spaces.floatingSpace.inMapMode = false
}
}
}
@@ -194,11 +194,11 @@ function newSuperalgosTutorialSpace() {
}
if (totalZoomSteps > 0) {
if (currentZoomStep < totalZoomSteps) {
UI.projects.superalgos.spaces.chartingSpace.viewport.onMouseWheel(event)
UI.projects.foundations.spaces.chartingSpace.viewport.onMouseWheel(event)
}
} else {
if (currentZoomStep > totalZoomSteps) {
UI.projects.superalgos.spaces.chartingSpace.viewport.onMouseWheel(event)
UI.projects.foundations.spaces.chartingSpace.viewport.onMouseWheel(event)
}
}
}
@@ -208,7 +208,7 @@ function newSuperalgosTutorialSpace() {
if (currentNode === undefined) { return }
let config = JSON.parse(currentNode.config)
if (config.viewportZoomAtCenter !== undefined) {
UI.projects.superalgos.spaces.chartingSpace.viewport.zoomAtCenter(config.viewportZoomAtCenter)
UI.projects.foundations.spaces.chartingSpace.viewport.zoomAtCenter(config.viewportZoomAtCenter)
}
}
@@ -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)
}
}
}
@@ -331,7 +331,7 @@ function newSuperalgosTutorialSpace() {
This forces the tutorial to close the workspaces panel and to keep it closed.
*/
if (workspacesCounter === 5) {
UI.projects.superalgos.spaces.sideSpace.sidePanelTab.close()
UI.projects.foundations.spaces.sideSpace.sidePanelTab.close()
}
return
}
@@ -340,7 +340,7 @@ function newSuperalgosTutorialSpace() {
This forces the tutorial to open the workspaces panel and to keep it closed.
*/
if (workspacesCounter === 5) {
UI.projects.superalgos.spaces.sideSpace.sidePanelTab.open()
UI.projects.foundations.spaces.sideSpace.sidePanelTab.open()
}
return
}
@@ -363,7 +363,7 @@ function newSuperalgosTutorialSpace() {
/*
This forces the tutorial to close the charting space and to keep it closed.
*/
UI.projects.superalgos.spaces.cockpitSpace.toTop()
UI.projects.foundations.spaces.cockpitSpace.toTop()
return
}
case "toMiddle": {
@@ -371,14 +371,14 @@ function newSuperalgosTutorialSpace() {
This forces the tutorial to share the screen half with the designer and half
with the charting space and force it in that way.
*/
UI.projects.superalgos.spaces.cockpitSpace.toMiddle()
UI.projects.foundations.spaces.cockpitSpace.toMiddle()
return
}
case "toBottom": {
/*
This forces the tutorial to fully open the charting space and to keep it open.
*/
UI.projects.superalgos.spaces.cockpitSpace.toBottom()
UI.projects.foundations.spaces.cockpitSpace.toBottom()
return
}
}
@@ -407,7 +407,7 @@ function newSuperalgosTutorialSpace() {
currentNode.payload.referenceParent.payload.floatingObject.unCollapseParent()
}
if (positionAtNodeCounter < 100) {
UI.projects.superalgos.spaces.floatingSpace.positionAtNode(currentNode.payload.referenceParent)
UI.projects.foundations.spaces.floatingSpace.positionAtNode(currentNode.payload.referenceParent)
}
}
if (
@@ -559,7 +559,7 @@ function newSuperalgosTutorialSpace() {
config.keyPressedTimeMachineReferenceParent !== undefined
) {
if (currentNode.payload.referenceParent.type === 'Time Machine') {
let timeMachine = UI.projects.superalgos.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
let timeMachine = UI.projects.foundations.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
if (timeMachine !== undefined) {
timeMachineKeyPressedCounter++
if (timeMachineKeyPressedCounter === 10) {
@@ -579,9 +579,9 @@ function newSuperalgosTutorialSpace() {
config.viewportCenterReferenceParent === true
) {
if (currentNode.payload.referenceParent.type === 'Time Machine') {
let timeMachine = UI.projects.superalgos.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
let timeMachine = UI.projects.foundations.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
if (timeMachine !== undefined && viewportCentered === false) {
UI.projects.superalgos.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
UI.projects.foundations.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
viewportCentered = true
}
}
@@ -590,7 +590,7 @@ function newSuperalgosTutorialSpace() {
config.repositionAtTimeMachineReferenceParent === true
) {
if (currentNode.payload.referenceParent.type === 'Time Machine') {
let timeMachine = UI.projects.superalgos.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
let timeMachine = UI.projects.foundations.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
if (timeMachine !== undefined) {
repositionAtTimeMachineCounter++
switch (true) {
@@ -599,12 +599,12 @@ function newSuperalgosTutorialSpace() {
delta: -1
}
for (let i = 0; i < 100; i++) {
UI.projects.superalgos.spaces.chartingSpace.viewport.onMouseWheel(event)
UI.projects.foundations.spaces.chartingSpace.viewport.onMouseWheel(event)
}
break
}
case (repositionAtTimeMachineCounter === 30): {
UI.projects.superalgos.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
UI.projects.foundations.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
break
}
case (repositionAtTimeMachineCounter === 60): {
@@ -619,11 +619,11 @@ function newSuperalgosTutorialSpace() {
break
}
case (repositionAtTimeMachineCounter === 90): {
UI.projects.superalgos.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
UI.projects.foundations.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
break
}
case (repositionAtTimeMachineCounter === 120): {
UI.projects.superalgos.spaces.chartingSpace.viewport.zoomAtCenter(8)
UI.projects.foundations.spaces.chartingSpace.viewport.zoomAtCenter(8)
break
}
}
@@ -634,7 +634,7 @@ function newSuperalgosTutorialSpace() {
config.repositionAtTimeMachineNoZoomReferenceParent === true
) {
if (currentNode.payload.referenceParent.type === 'Time Machine') {
let timeMachine = UI.projects.superalgos.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
let timeMachine = UI.projects.foundations.spaces.chartingSpace.findTimeMachine(currentNode.payload.referenceParent)
if (timeMachine !== undefined) {
repositionAtTimeMachineCounter++
switch (true) {
@@ -643,12 +643,12 @@ function newSuperalgosTutorialSpace() {
let event = {
delta: -1
}
UI.projects.superalgos.spaces.chartingSpace.viewport.onMouseWheel(event)
UI.projects.foundations.spaces.chartingSpace.viewport.onMouseWheel(event)
}
break
}
case (repositionAtTimeMachineCounter === 30): {
UI.projects.superalgos.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
UI.projects.foundations.spaces.chartingSpace.viewport.displaceToContainer(timeMachine.container)
break
}
}
@@ -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'
}
@@ -770,7 +770,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: 'Skipped'
}
UI.projects.superalgos.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
advance(true)
}
@@ -787,10 +787,10 @@ function newSuperalgosTutorialSpace() {
Reseet the Status of Current and Previous Node
so that RESUME goes to the right node.
*/
UI.projects.superalgos.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
previousNode = navigationStack[navigationStack.length - 3]
if (previousNode !== undefined) {
UI.projects.superalgos.utilities.tutorial.saveTutorial(previousNode.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(previousNode.payload, tutorial)
}
previousNode = navigationStack[navigationStack.length - 2]
switch (previousNode.type) {
@@ -827,7 +827,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: 'Done'
}
UI.projects.superalgos.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
advance()
}
@@ -920,7 +920,7 @@ function newSuperalgosTutorialSpace() {
}
function playTutorial(node) {
if (UI.projects.superalgos.spaces.designSpace.workspace.isInitialized !== true) { return }
if (UI.projects.foundations.spaces.designSpace.workspace.isInitialized !== true) { return }
PAGE_NUMBER = 0
TUTORIAL_NAME = node.name
@@ -935,7 +935,7 @@ function newSuperalgosTutorialSpace() {
}
function resumeTutorial(node) {
if (UI.projects.superalgos.spaces.designSpace.workspace.isInitialized !== true) { return }
if (UI.projects.foundations.spaces.designSpace.workspace.isInitialized !== true) { return }
navigationStack = []
node.payload.uiObject.isPlaying = true
@@ -997,7 +997,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: 'Reset'
}
UI.projects.superalgos.utilities.tutorial.saveTutorial(tutorialStep.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(tutorialStep.payload, tutorial)
}
for (let i = 0; i < node.tutorialTopics.length; i++) {
@@ -1005,7 +1005,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: 'Reset'
}
UI.projects.superalgos.utilities.tutorial.saveTutorial(tutorialTopic.payload, tutorial)
UI.projects.foundations.utilities.tutorial.saveTutorial(tutorialTopic.payload, tutorial)
resetNextNode(tutorialTopic)
}
}
@@ -1075,7 +1075,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.superalgos.utilities.tutorial.loadTutorial(tutorialStep.payload, tutorial)
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialStep.payload, tutorial)
currentNode = tutorialStep
currentStatus = 'Playing Step'
navigationStack.push(currentNode)
@@ -1111,7 +1111,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.superalgos.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
currentNode = tutorialTopic
currentStatus = 'Playing Topic'
navigationStack.push(currentNode)
@@ -1150,7 +1150,7 @@ function newSuperalgosTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.superalgos.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
currentNode = tutorialTopic
currentStatus = 'Playing Topic'
navigationStack.push(currentNode)
@@ -1187,7 +1187,7 @@ function newSuperalgosTutorialSpace() {
text: "If you are a new user then please refresh the UI with F5."
},
icon: {
project: "Superalgos",
project: "Foundations",
name: "warning"
},
paragraphs: [
@@ -1198,7 +1198,7 @@ function newSuperalgosTutorialSpace() {
{
style: "Json",
text: ' \"docs\": { \n' +
'\"project\": \"Superalgos\",\n' +
'\"project\": \"Foundations\",\n' +
'\"category\": \"Tutorial\",\n' +
'\"type\": \"Tutorial Step - Bla Bla\"\n' +
'}'
@@ -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() {
@@ -1243,7 +1243,7 @@ function newSuperalgosTutorialSpace() {
if (nodeConfig.icon === undefined) {
nodeConfig.icon = {
name: nodeConfig.image, // This property comes from the migration
project: 'Superalgos'
project: 'Foundations'
}
nodeConfig.image = undefined // Removing this legacy property.
@@ -1318,11 +1318,11 @@ function newSuperalgosTutorialSpace() {
if (fullscreenMode === false) {
if (schemaDocument.definition.icon === undefined || schemaDocument.definition.icon.name === '') {
/* When there is no image, we will render a Summary instead of a Table */
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-summary">' + text + '</div>'
} else {
html = html + '<table class="tutorial-definitionTable">'
@@ -1336,11 +1336,11 @@ function newSuperalgosTutorialSpace() {
html = html + '</td>'
html = html + '<td>'
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(schemaDocument.definition)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<strong class="tutorial-font-bold-small">' + text + '</strong>'
html = html + '</td>'
@@ -1354,102 +1354,102 @@ function newSuperalgosTutorialSpace() {
let paragraph = schemaDocument.paragraphs[i]
switch (paragraph.style) {
case 'Summary': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-summary">' + text + '</div>'
break
}
case 'Title': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<h2 class="tutorial-font-medium">' + text + '</h2>'
break
}
case 'Gif': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<div id="tutorialGifDiv" width="200" width="290"/>'
newGifName = text
break
}
case 'Text': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small">' + text + '</div>'
break
}
case 'Json': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<pre><code class="language-json">' + text + '</code></pre>'
break
}
case 'Javascript': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '<pre><code class="language-javascript">' + text + '</code></pre>'
break
}
case 'List': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addBold(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addBold(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-list"><ul><li>' + text + '</li></ul></div>'
break
}
case 'Callout': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-bold-small tutorial-callout" > ' + text + '</div>'
break
}
case 'Link': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
let splittedText = text.split('->')
html = html + '<a class="tutorial-font-small tutorial-external-link" href="' + 'https://' + splittedText[1] + '" target="_blank">' + splittedText[0] + '</a>'
break
}
case 'Note': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-info" role="alert"><i class="tutorial-fa tutorial-info-circle"></i> <b>Note:</b> ' + text + '</div>'
break
}
case 'Success': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-success" role="alert"><i class="tutorial-fa tutorial-check-square-o"></i> <b>Tip:</b> ' + text + '</div>'
break
}
case 'Important': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-important" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Important:</b> ' + text + '</div>'
break
}
case 'Warning': {
let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.superalgos.utilities.docs.addToolTips(text)
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.education.utilities.docs.addKeyboard(text)
text = UI.projects.education.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.education.utilities.docs.addCodeToWhiteList(text)
text = UI.projects.education.utilities.docs.addToolTips(text)
html = html + '<div class="tutorial-font-small tutorial-alert-warning" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Warning:</b> ' + text + '</div>'
break
}
@@ -1,4 +1,4 @@
function newSuperalgosUtilitiesDocs() {
function newEducationUtilitiesDocs() {
let thisObject = {
buildOrderedPageIndex: buildOrderedPageIndex,
addWarningIfTranslationIsOutdated: addWarningIfTranslationIsOutdated,
@@ -94,7 +94,7 @@ function newSuperalgosUtilitiesDocs() {
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.updated === undefined) { continue }
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) {
if (translation.language === UI.projects.education.spaces.docsSpace.language) {
if (paragraph.updated < translation.updated) {
return ''
} else {
@@ -111,17 +111,17 @@ function newSuperalgosUtilitiesDocs() {
if (paragraph.translations.length === 0) { return paragraph.text }
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) { return translation.text }
if (translation.language === UI.projects.education.spaces.docsSpace.language) { return translation.text }
}
return paragraph.text
}
function setTextBasedOnLanguage(paragraph, text) {
if (UI.projects.superalgos.spaces.docsSpace.language === UI.projects.superalgos.globals.docs.DEFAULT_LANGUAGE) {
if (UI.projects.education.spaces.docsSpace.language === UI.projects.education.globals.docs.DEFAULT_LANGUAGE) {
if (paragraph.text !== text) {
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
paragraph.text = text
paragraph.updated = (new Date()).valueOf()
@@ -142,11 +142,11 @@ function newSuperalgosUtilitiesDocs() {
}
for (let i = 0; i < paragraph.translations.length; i++) {
let translation = paragraph.translations[i]
if (translation.language === UI.projects.superalgos.spaces.docsSpace.language) {
if (translation.language === UI.projects.education.spaces.docsSpace.language) {
if (translation.text !== text) {
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
translation.text = text
translation.updated = (new Date()).valueOf()
@@ -155,14 +155,14 @@ function newSuperalgosUtilitiesDocs() {
}
}
let translation = {
language: UI.projects.superalgos.spaces.docsSpace.language,
language: UI.projects.education.spaces.docsSpace.language,
text: text,
updated: (new Date()).valueOf()
}
paragraph.translations.push(translation)
/* This will make the Client to save this in a file overwritting the previous version*/
UI.projects.superalgos.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
UI.projects.education.spaces.docsSpace.documentPage.docsSchemaDocument.updated = true
return
}
@@ -445,7 +445,7 @@ function newSuperalgosUtilitiesDocs() {
let result = ''
for (let i = 0; i < splittedText.length; i++) {
let word = splittedText[i]
if (UI.projects.superalgos.utilities.strings.isCamelCase(word) === true) {
if (UI.projects.foundations.utilities.strings.isCamelCase(word) === true) {
word = '<code class="docs-code">' + word + '</code>'
}
if (i === 0) {
@@ -489,25 +489,25 @@ function newSuperalgosUtilitiesDocs() {
let found = false
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase4) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase4) === true) {
changedText = changedText + phrase4.replace(cleanPhrase4, '<i>' + cleanPhrase4 + '</i>') + ' '
i = i + 3
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase3) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase3) === true) {
changedText = changedText + phrase3.replace(cleanPhrase3, '<i>' + cleanPhrase3 + '</i>') + ' '
i = i + 2
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase2) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase2) === true) {
changedText = changedText + phrase2.replace(cleanPhrase2, '<i>' + cleanPhrase2 + '</i>') + ' '
i = i + 1
found = true
}
if (found === false && UI.projects.superalgos.spaces.docsSpace.menuLabelsMap.get(cleanPhrase1) === true) {
if (found === false && UI.projects.education.spaces.docsSpace.menuLabelsMap.get(cleanPhrase1) === true) {
changedText = changedText + phrase1.replace(cleanPhrase1, '<i>' + cleanPhrase1 + '</i>') + ' '
i = i + 0
found = true
@@ -523,8 +523,8 @@ function newSuperalgosUtilitiesDocs() {
function addToolTips(text, excludedType) {
const TOOL_TIP_HTML = '<div onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip">TYPE_LABEL<span class="docs-tooltiptext">DEFINITION</span></div>'
const LINK_ONLY_HTML = '<div onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-link">TYPE_LABEL<span class="docs-tooltiptext"></span></div>'
const TOOL_TIP_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip">TYPE_LABEL<span class="docs-tooltiptext">DEFINITION</span></div>'
const LINK_ONLY_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-link">TYPE_LABEL<span class="docs-tooltiptext"></span></div>'
let resultingText = ''
text = tagDefinedTypes(text, excludedType)
@@ -586,7 +586,7 @@ function newSuperalgosUtilitiesDocs() {
return text
}
let definition = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
let definition = UI.projects.education.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
if (definition === undefined || definition === "") {
let tooltip = LINK_ONLY_HTML
.replace('CATEGORY', category)
@@ -1,4 +1,4 @@
function newSuperalgosUtilitiesLanguages() {
function newEducationUtilitiesLanguages() {
let thisObject = {
getLaguageLabel: getLaguageLabel
}
@@ -48,14 +48,14 @@
"name": "processes",
"type": "array",
"childType": "Process Definition",
"project": "Superalgos",
"project": "Foundations",
"autoAdd": true
},
{
"name": "products",
"type": "array",
"childType": "Product Definition",
"project": "Superalgos",
"project": "Foundations",
"autoAdd": true
}
],
@@ -52,7 +52,7 @@
"name": "projectDefinition",
"type": "node",
"childType": "Project Definition",
"project": "Superalgos",
"project": "Foundations",
"autoAdd": true
}
]
@@ -7,7 +7,7 @@ function newEthereumFunctionLibraryAccounts() {
function createWalletAccount(node) {
let walletAccountNode = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Wallet Account')
let walletAccountNode = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Wallet Account')
let params = {
method: 'createWalletAccount',
@@ -12,6 +12,7 @@ function newEthereumBlockchainSpace() {
thisObject.container = newContainer()
thisObject.container.initialize(MODULE_NAME)
thisObject.container.isDraggeable = false
let lastTryToReconnectDatetime
@@ -48,9 +49,9 @@ function newEthereumBlockchainSpace() {
async function checkStatus() {
try {
if (UI.projects.superalgos.spaces.designSpace.workspace === undefined) { return }
if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return }
let blockchain = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Ethereum Blockchain')
let blockchain = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Ethereum Blockchain')
if (blockchain === undefined) { return }
for (let i = 0; i < blockchain.blockchainNetworks.length; i++) {
let blockchainNetwork = blockchain.blockchainNetworks[i]
@@ -166,6 +167,8 @@ function newEthereumBlockchainSpace() {
function getContainer(point) {
return undefined // since this space does not draw anything we return here
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
thisObject.container.space = MODULE_NAME
return thisObject.container
@@ -12,6 +12,7 @@ function newEthereumWalletSpace() {
thisObject.container = newContainer()
thisObject.container.initialize(MODULE_NAME)
thisObject.container.isDraggeable = false
let lastTryToReconnectDatetime
@@ -47,10 +48,10 @@ function newEthereumWalletSpace() {
async function checkBalances() {
try {
if (UI.projects.superalgos.spaces.designSpace.workspace === undefined) { return }
if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return }
let wallets = []
let hierarchyHeads = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeads()
let hierarchyHeads = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeads()
for (let i = 0; i < hierarchyHeads.length; i++) {
let hierarchyHead = hierarchyHeads[i]
if (hierarchyHead.type === 'Ethereum Wallet') {
@@ -92,7 +93,7 @@ function newEthereumWalletSpace() {
'Ethereum Token->Smart Contract->' +
'ERC-20 Token Type->ERC-223 Token Type->ERC-721 Token Type->ERC-777 Token Type->'
route.params.walletDefinition = UI.projects.superalgos.functionLibraries.protocolNode.getProtocolNode(wallet, false, true, true, false, false, lightingPath)
route.params.walletDefinition = UI.projects.foundations.functionLibraries.protocolNode.getProtocolNode(wallet, false, true, true, false, false, lightingPath)
httpRequest(JSON.stringify(route.params), route.url, onResponse)
@@ -149,6 +150,8 @@ function newEthereumWalletSpace() {
function getContainer(point) {
return undefined // since this space does not draw anything we return here
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
thisObject.container.space = MODULE_NAME
return thisObject.container
@@ -67,8 +67,8 @@
/* Stop listening to the necesary events. */
thisObject.container.eventHandler.stopListening(onMouseOverEventSuscriptionId)
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
thisObject.container.eventHandler.stopListening(dimmensionsChangedEventSubscriptionId)
marketFiles.eventHandler.stopListening(marketFilesUpdatedEventSubscriptionId);
@@ -121,8 +121,8 @@
/* Listen to the necesary events. */
zoomChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
zoomChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
@@ -157,7 +157,7 @@
}
function onMouseOver(event) {
let userPosition = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
let userPosition = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
userPositionDate = userPosition.valueOf()
}
@@ -320,8 +320,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -413,8 +413,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -525,19 +525,19 @@
bandPoint5 = coordinateSystem.transformThisPoint(bandPoint5);
bandPoint6 = coordinateSystem.transformThisPoint(bandPoint6);
bandPoint1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint1, thisObject.container);
bandPoint2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint2, thisObject.container);
bandPoint3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint3, thisObject.container);
bandPoint4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint4, thisObject.container);
bandPoint5 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint5, thisObject.container);
bandPoint6 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(bandPoint6, thisObject.container);
bandPoint1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint1, thisObject.container);
bandPoint2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint2, thisObject.container);
bandPoint3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint3, thisObject.container);
bandPoint4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint4, thisObject.container);
bandPoint5 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint5, thisObject.container);
bandPoint6 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(bandPoint6, thisObject.container);
if (bandPoint2.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || bandPoint1.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
if (bandPoint2.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || bandPoint1.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
continue;
}
if (UI.projects.superalgos.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.superalgos.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PACKING_OBJECTS_AT_THE_BOTTOM_OR_TOP_OF_VIEWPORT) {
let diffA = bandPoint1.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
if (UI.projects.foundations.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.foundations.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PACKING_OBJECTS_AT_THE_BOTTOM_OR_TOP_OF_VIEWPORT) {
let diffA = bandPoint1.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
if (diffA > 0) {
bandPoint1.y = bandPoint1.y - diffA
bandPoint2.y = bandPoint2.y - diffA
@@ -547,7 +547,7 @@
bandPoint6.y = bandPoint6.y - diffA
}
let diffB = bandPoint2.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y
let diffB = bandPoint2.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y
if (diffB < 0) {
bandPoint1.y = bandPoint1.y - diffB
bandPoint2.y = bandPoint2.y - diffB
@@ -558,12 +558,12 @@
}
}
bandPoint1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint1);
bandPoint2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint2);
bandPoint3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint3);
bandPoint4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint4);
bandPoint5 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint5);
bandPoint6 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint6);
bandPoint1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint1);
bandPoint2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint2);
bandPoint3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint3);
bandPoint4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint4);
bandPoint5 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint5);
bandPoint6 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(bandPoint6);
bandPoint1 = thisObject.fitFunction(bandPoint1);
bandPoint2 = thisObject.fitFunction(bandPoint2);
@@ -591,9 +591,9 @@
}
if (
bandPoint1.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.x + 150
bandPoint1.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.x + 150
||
bandPoint1.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.x - 150
bandPoint1.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.x - 150
) {
// we leave this bands without fill.
} else {
@@ -37,8 +37,8 @@ function newBollingerPlottersBollingerBandsBollingerBandsBollingerBandsPanel() {
thisObject.container.frame.width = UI_PANEL.WIDTH.NORMAL;
thisObject.container.frame.height = UI_PANEL.HEIGHT.NORMAL;
thisObject.container.frame.position.x = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 3;
thisObject.container.frame.position.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
thisObject.container.frame.position.x = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 3;
thisObject.container.frame.position.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
upDownButton = newUpDownButton()
upDownButton.parentContainer = thisObject.container
@@ -202,18 +202,18 @@ function newBollingerPlottersBollingerBandsBollingerBandsBollingerBandsPanel() {
let y;
if (currentBand.innerBand.direction !== undefined) {
UI.projects.superalgos.utilities.drawPrint.printLabel('Direction', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentBand.innerBand.direction, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Direction', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentBand.innerBand.direction, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
}
UI.projects.superalgos.utilities.drawPrint.printLabel('Moving Average', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.15, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentBand.innerBand.movingAverage, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.20, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
UI.projects.foundations.utilities.drawPrint.printLabel('Moving Average', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.15, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentBand.innerBand.movingAverage, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.20, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
UI.projects.superalgos.utilities.drawPrint.printLabel('Deviation', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.85, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentBand.innerBand.deviation, X_AXIS, frameTitleHeight + frameBodyHeight * 0.80, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
UI.projects.foundations.utilities.drawPrint.printLabel('Deviation', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.85, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentBand.innerBand.deviation, X_AXIS, frameTitleHeight + frameBodyHeight * 0.80, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
UI.projects.superalgos.utilities.drawPrint.printLabel('Standard Deviation', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentBand.innerBand.standardDeviation, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
UI.projects.foundations.utilities.drawPrint.printLabel('Standard Deviation', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentBand.innerBand.standardDeviation, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction, undefined, undefined, 10);
}
}
@@ -65,8 +65,8 @@
/* Stop listening to the necesary events. */
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
thisObject.container.eventHandler.stopListening(dimmensionsChangedEventSubscriptionId)
marketFiles.eventHandler.stopListening(marketFilesUpdatedEventSubscriptionId);
@@ -115,8 +115,8 @@
/* Listen to the necesary events. */
zoomChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
zoomChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
@@ -301,8 +301,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -386,8 +386,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -480,7 +480,7 @@
plotAreaViewport.initializeY(
minValue,
maxValue,
UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y
UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y
);
plotAreaFrame.initializeY(
@@ -510,7 +510,7 @@
/* This next section is to get ready in order to be able to plot dinamically constrained to the viewport */
let visibleHeight = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y;
let visibleHeight = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y;
let frameCorner1 = {
x: 0,
@@ -524,8 +524,8 @@
/* Now the transformations. */
frameCorner1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(frameCorner1, thisObject.container.frame.container);
frameCorner2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(frameCorner2, thisObject.container.frame.container);
frameCorner1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(frameCorner1, thisObject.container.frame.container);
frameCorner2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(frameCorner2, thisObject.container.frame.container);
let frameHeightInViewPort = frameCorner2.y - frameCorner1.y;
let pbChartHeight = 20;
@@ -637,21 +637,21 @@
pbPoint9 = plot.transformThisPoint(pbPoint9);
pbPoint10 = plot.transformThisPoint(pbPoint10);
pbPoint1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint1, thisObject.container);
pbPoint2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint2, thisObject.container);
pbPoint1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint1, thisObject.container);
pbPoint2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint2, thisObject.container);
pbPoint3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint3, thisObject.container);
pbPoint4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint4, thisObject.container);
pbPoint5 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint5, thisObject.container);
pbPoint6 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint6, thisObject.container);
pbPoint3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint3, thisObject.container);
pbPoint4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint4, thisObject.container);
pbPoint5 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint5, thisObject.container);
pbPoint6 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint6, thisObject.container);
pbPoint7 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint7, thisObject.container);
pbPoint8 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint8, thisObject.container);
pbPoint7 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint7, thisObject.container);
pbPoint8 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint8, thisObject.container);
pbPoint9 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint9, thisObject.container);
pbPoint10 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(pbPoint10, thisObject.container);
pbPoint9 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint9, thisObject.container);
pbPoint10 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(pbPoint10, thisObject.container);
if (pbPoint1.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || pbPoint2.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
if (pbPoint1.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || pbPoint2.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
return false;
}
@@ -669,37 +669,37 @@
/* Now we set the real value of y. */
pbPoint1.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousPercentBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint2.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentPercentBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint1.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousPercentBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint2.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentPercentBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint3.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (0 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint4.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (30 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint5.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (70 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint6.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (100 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint3.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (0 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint4.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (30 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint5.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (70 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint6.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (100 * pbChartHeight / 100 + pbOffset) * plotAreaViewport.scale.y;
pbPoint7.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousMovingAverage + pbOffset) * plotAreaViewport.scale.y;
pbPoint8.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentMovingAverage + pbOffset) * plotAreaViewport.scale.y;
pbPoint7.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousMovingAverage + pbOffset) * plotAreaViewport.scale.y;
pbPoint8.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentMovingAverage + pbOffset) * plotAreaViewport.scale.y;
pbPoint9.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint10.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint9.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (previousBandwidth + pbOffset) * plotAreaViewport.scale.y;
pbPoint10.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - (currentBandwidth + pbOffset) * plotAreaViewport.scale.y;
}
/* Everything must fit within the visible area */
pbPoint1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint1);
pbPoint2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint2);
pbPoint1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint1);
pbPoint2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint2);
pbPoint3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint3);
pbPoint4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint4);
pbPoint5 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint5);
pbPoint6 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint6);
pbPoint3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint3);
pbPoint4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint4);
pbPoint5 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint5);
pbPoint6 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint6);
pbPoint7 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint7);
pbPoint8 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint8);
pbPoint7 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint7);
pbPoint8 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint8);
pbPoint9 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint9);
pbPoint10 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint10);
pbPoint9 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint9);
pbPoint10 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(pbPoint10);
/* Now the drawing of the lines */
@@ -37,8 +37,8 @@ function newCandlesPlottersCandlesVolumesCandlesCandlePanel() {
thisObject.container.frame.width = UI_PANEL.WIDTH.NORMAL;
thisObject.container.frame.height = UI_PANEL.HEIGHT.NORMAL;
thisObject.container.frame.position.x = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 2;
thisObject.container.frame.position.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
thisObject.container.frame.position.x = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 2;
thisObject.container.frame.position.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
upDownButton = newUpDownButton()
upDownButton.parentContainer = thisObject.container
@@ -324,27 +324,27 @@ function newCandlesPlottersCandlesVolumesCandlesCandlePanel() {
let y;
UI.projects.superalgos.utilities.drawPrint.printLabel('Max', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.max, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Max', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.max, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel('Min', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.min, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Min', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.min, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
y = Y_AXIS - currentCandle.bodyHeight / 2;
if (y < frameTitleHeight + frameBodyHeight * 0.15) { y = frameTitleHeight + frameBodyHeight * 0.15; }
if (y > frameTitleHeight + frameBodyHeight * 0.80) { y = frameTitleHeight + frameBodyHeight * 0.80; }
UI.projects.superalgos.utilities.drawPrint.printLabel('Open', undefined, undefined, X_AXIS * 2 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.open, undefined, undefined, X_AXIS * 2 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Open', undefined, undefined, X_AXIS * 2 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.open, undefined, undefined, X_AXIS * 2 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
y = Y_AXIS + currentCandle.bodyHeight / 2;
if (y < frameTitleHeight + frameBodyHeight * 0.15) { y = frameTitleHeight + frameBodyHeight * 0.15; }
if (y > frameTitleHeight + frameBodyHeight * 0.80) { y = frameTitleHeight + frameBodyHeight * 0.80; }
UI.projects.superalgos.utilities.drawPrint.printLabel('Close', undefined, undefined, X_AXIS * 7 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.close, undefined, undefined, X_AXIS * 7 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Close', undefined, undefined, X_AXIS * 7 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.close, undefined, undefined, X_AXIS * 7 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
}
}
@@ -57,8 +57,8 @@
/* Stop listening to the necesary events. */
thisObject.container.eventHandler.stopListening(onMouseOverEventSuscriptionId)
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
thisObject.container.eventHandler.stopListening(dimmensionsChangedEventSubscriptionId)
marketFiles.eventHandler.stopListening(marketFilesUpdatedEventSubscriptionId);
@@ -110,8 +110,8 @@
/* Listen to the necesary events. */
zoomChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
zoomChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
@@ -146,7 +146,7 @@
}
function onMouseOver(event) {
let userPosition = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
let userPosition = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
userPositionDate = userPosition.valueOf()
}
@@ -303,8 +303,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -400,8 +400,8 @@
let daysOnSides = getSideDays(timeFrame);
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -470,7 +470,7 @@
try {
let elementsPlotted = 0
let lowResolution = false
if (UI.projects.superalgos.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.superalgos.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PLOTTING_IN_LOW_RESOLUTION) {
if (UI.projects.foundations.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.foundations.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PLOTTING_IN_LOW_RESOLUTION) {
if (candles.length > 100) {
lowResolution = true
}
@@ -512,15 +512,15 @@
candle.candlePoint3 = coordinateSystem.transformThisPoint(candle.candlePoint3);
candle.candlePoint4 = coordinateSystem.transformThisPoint(candle.candlePoint4);
candle.candlePoint1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint1, thisObject.container);
candle.candlePoint2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint2, thisObject.container);
candle.candlePoint3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint3, thisObject.container);
candle.candlePoint4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint4, thisObject.container);
candle.candlePoint1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint1, thisObject.container);
candle.candlePoint2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint2, thisObject.container);
candle.candlePoint3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint3, thisObject.container);
candle.candlePoint4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.candlePoint4, thisObject.container);
/* Skip the first candle with zero at open */
if (candle.open === 0) { continue }
if (candle.candlePoint2.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || candle.candlePoint1.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
if (candle.candlePoint2.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || candle.candlePoint1.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
continue
}
@@ -551,13 +551,13 @@
candle.stickPoint3 = coordinateSystem.transformThisPoint(candle.stickPoint3);
candle.stickPoint4 = coordinateSystem.transformThisPoint(candle.stickPoint4);
candle.stickPoint1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint1, thisObject.container);
candle.stickPoint2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint2, thisObject.container);
candle.stickPoint3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint3, thisObject.container);
candle.stickPoint4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint4, thisObject.container);
candle.stickPoint1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint1, thisObject.container);
candle.stickPoint2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint2, thisObject.container);
candle.stickPoint3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint3, thisObject.container);
candle.stickPoint4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(candle.stickPoint4, thisObject.container);
if (UI.projects.superalgos.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.superalgos.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PACKING_OBJECTS_AT_THE_BOTTOM_OR_TOP_OF_VIEWPORT) {
let diffA = candle.stickPoint3.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
if (UI.projects.foundations.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.foundations.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PACKING_OBJECTS_AT_THE_BOTTOM_OR_TOP_OF_VIEWPORT) {
let diffA = candle.stickPoint3.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
if (diffA > 0) {
candle.candlePoint1.y = candle.candlePoint1.y - diffA
candle.candlePoint2.y = candle.candlePoint2.y - diffA
@@ -570,7 +570,7 @@
candle.stickPoint4.y = candle.stickPoint4.y - diffA
}
let diffB = candle.stickPoint1.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y
let diffB = candle.stickPoint1.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y
if (diffB < 0) {
candle.candlePoint1.y = candle.candlePoint1.y - diffB
candle.candlePoint2.y = candle.candlePoint2.y - diffB
@@ -584,20 +584,20 @@
}
}
candle.candlePoint1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint1);
candle.candlePoint2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint2);
candle.candlePoint3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint3);
candle.candlePoint4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint4);
candle.candlePoint1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint1);
candle.candlePoint2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint2);
candle.candlePoint3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint3);
candle.candlePoint4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.candlePoint4);
candle.candlePoint1 = thisObject.fitFunction(candle.candlePoint1);
candle.candlePoint2 = thisObject.fitFunction(candle.candlePoint2);
candle.candlePoint3 = thisObject.fitFunction(candle.candlePoint3);
candle.candlePoint4 = thisObject.fitFunction(candle.candlePoint4);
candle.stickPoint1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint1);
candle.stickPoint2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint2);
candle.stickPoint3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint3);
candle.stickPoint4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint4);
candle.stickPoint1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint1);
candle.stickPoint2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint2);
candle.stickPoint3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint3);
candle.stickPoint4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(candle.stickPoint4);
candle.stickPoint1 = thisObject.fitFunction(candle.stickPoint1);
candle.stickPoint2 = thisObject.fitFunction(candle.stickPoint2);
@@ -37,8 +37,8 @@ function newCandlesPlottersCandlesVolumesVolumesVolumePanel() {
thisObject.container.frame.width = UI_PANEL.WIDTH.NORMAL;
thisObject.container.frame.height = UI_PANEL.HEIGHT.NORMAL;
thisObject.container.frame.position.x = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width;
thisObject.container.frame.position.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
thisObject.container.frame.position.x = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width;
thisObject.container.frame.position.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
upDownButton = newUpDownButton()
upDownButton.parentContainer = thisObject.container
@@ -243,11 +243,11 @@ function newCandlesPlottersCandlesVolumesVolumesVolumePanel() {
/* put the labels with the volumes values */
UI.projects.superalgos.utilities.drawPrint.printLabel('Buy Volume', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentVolume.innerVolumeBar.amountBuy, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Buy Volume', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentVolume.innerVolumeBar.amountBuy, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel('Sell Volume', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentVolume.innerVolumeBar.amountSell, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Sell Volume', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentVolume.innerVolumeBar.amountSell, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
}
@@ -65,8 +65,8 @@
/* Stop listening to the necesary events. */
thisObject.container.eventHandler.stopListening(onMouseOverEventSuscriptionId)
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
thisObject.container.eventHandler.stopListening(dimmensionsChangedEventSubscriptionId)
marketFiles.eventHandler.stopListening(marketFilesUpdatedEventSubscriptionId);
@@ -118,8 +118,8 @@
/* Listen to the necesary events. */
zoomChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.superalgos.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
zoomChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Zoom Changed", onViewportZoomChanged);
offsetChangedEventSubscriptionId = UI.projects.foundations.spaces.chartingSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
@@ -154,7 +154,7 @@
}
function onMouseOver(event) {
let userPosition = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
let userPosition = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
userPositionDate = userPosition.valueOf()
}
@@ -298,8 +298,8 @@
if (fileCursor.files.size === 0) { return; } // We need to wait until there are files in the cursor
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -382,8 +382,8 @@
if (marketFile === undefined) { return; } // Initialization not complete yet.
let leftDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.superalgos.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let leftDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem);
let rightDate = UI.projects.foundations.utilities.dateRateTransformations.getDateFromPointAtBrowserCanvas(UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem);
let dateDiff = rightDate.valueOf() - leftDate.valueOf();
@@ -435,7 +435,7 @@
try {
let lowResolution = false
if (UI.projects.superalgos.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.superalgos.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PLOTTING_IN_LOW_RESOLUTION) {
if (UI.projects.foundations.spaces.chartingSpace.viewport.zoomTargetLevel < UI.projects.foundations.globals.zoom.ZOOM_OUT_THRESHOLD_FOR_PLOTTING_IN_LOW_RESOLUTION) {
if (volumes.length > 100) {
lowResolution = true
}
@@ -445,7 +445,7 @@
/* Now we calculate and plot the volumes */
let visibleHeight = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y;
let visibleHeight = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y;
let frameCorner1 = {
x: 0,
@@ -460,8 +460,8 @@
/* Now the transformations. */
frameCorner1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(frameCorner1, thisObject.container.frame.container);
frameCorner2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(frameCorner2, thisObject.container.frame.container);
frameCorner1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(frameCorner1, thisObject.container.frame.container);
frameCorner2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(frameCorner2, thisObject.container.frame.container);
let frameHeightInViewPort = frameCorner2.y - frameCorner1.y;
@@ -503,17 +503,17 @@
volumePointA3 = plot.transformThisPoint(volumePointA3);
volumePointA4 = plot.transformThisPoint(volumePointA4);
volumePointA1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointA1, thisObject.container);
volumePointA2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointA2, thisObject.container);
volumePointA3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointA3, thisObject.container);
volumePointA4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointA4, thisObject.container);
volumePointA1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointA1, thisObject.container);
volumePointA2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointA2, thisObject.container);
volumePointA3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointA3, thisObject.container);
volumePointA4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointA4, thisObject.container);
let baseIncrement = (volumePointA3.x - volumePointA1.x) * WIDHTER_VOLUME_BAR_BASE_FACTOR;
volumePointA1.x = volumePointA1.x - baseIncrement;
volumePointA4.x = volumePointA4.x + baseIncrement;
if (volumePointA4.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || volumePointA1.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
if (volumePointA4.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x || volumePointA1.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.x) {
return false;
}
@@ -523,7 +523,7 @@
if (calculateBuys(coordinateSystem, thisObject.container.frame.height) === false) { continue; } // We try to see if it fits in the visible area.
let diffA = volumePointA1.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
let diffA = volumePointA1.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y
if (diffA > 0) {
volumePointA1.y = volumePointA1.y - diffA
volumePointA2.y = volumePointA2.y - diffA
@@ -563,15 +563,15 @@
volumePointB3 = plot.transformThisPoint2(volumePointB3);
volumePointB4 = plot.transformThisPoint2(volumePointB4);
volumePointB1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointB1, thisObject.container);
volumePointB2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointB2, thisObject.container);
volumePointB3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointB3, thisObject.container);
volumePointB4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(volumePointB4, thisObject.container);
volumePointB1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointB1, thisObject.container);
volumePointB2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointB2, thisObject.container);
volumePointB3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointB3, thisObject.container);
volumePointB4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(volumePointB4, thisObject.container);
}
calculateSells(coordinateSystem, thisObject.container.frame.height); // We try to see if it fits in the visible area.
let diffB = volumePointB1.y - UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y
let diffB = volumePointB1.y - UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y
if (diffB < 0) {
volumePointB1.y = volumePointB1.y - diffB
volumePointB2.y = volumePointB2.y - diffB
@@ -599,15 +599,15 @@
/* Everything must fit within the visible area */
volumePointA1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA1);
volumePointA2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA2);
volumePointA3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA3);
volumePointA4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA4);
volumePointA1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA1);
volumePointA2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA2);
volumePointA3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA3);
volumePointA4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointA4);
volumePointB1 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB1);
volumePointB2 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB2);
volumePointB3 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB3);
volumePointB4 = UI.projects.superalgos.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB4);
volumePointB1 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB1);
volumePointB2 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB2);
volumePointB3 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB3);
volumePointB4 = UI.projects.foundations.spaces.chartingSpace.viewport.fitIntoVisibleArea(volumePointB4);
volumePointA1 = thisObject.fitFunction(volumePointA1);
volumePointA2 = thisObject.fitFunction(volumePointA2);
@@ -37,8 +37,8 @@ function newCandlesPlottersCandlesVolumesCandlesCandlePanel() {
thisObject.container.frame.width = UI_PANEL.WIDTH.NORMAL;
thisObject.container.frame.height = UI_PANEL.HEIGHT.NORMAL;
thisObject.container.frame.position.x = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 2;
thisObject.container.frame.position.y = UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
thisObject.container.frame.position.x = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 2;
thisObject.container.frame.position.y = UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.y - thisObject.container.frame.height;
upDownButton = newUpDownButton()
upDownButton.parentContainer = thisObject.container
@@ -324,27 +324,27 @@ function newCandlesPlottersCandlesVolumesCandlesCandlePanel() {
let y;
UI.projects.superalgos.utilities.drawPrint.printLabel('Max', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.max, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Max', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.05, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.max, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.10, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel('Min', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.min, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Min', undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.95, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.min, undefined, undefined, X_AXIS, frameTitleHeight + frameBodyHeight * 0.90, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
y = Y_AXIS - currentCandle.bodyHeight / 2;
if (y < frameTitleHeight + frameBodyHeight * 0.15) { y = frameTitleHeight + frameBodyHeight * 0.15; }
if (y > frameTitleHeight + frameBodyHeight * 0.80) { y = frameTitleHeight + frameBodyHeight * 0.80; }
UI.projects.superalgos.utilities.drawPrint.printLabel('Open', undefined, undefined, X_AXIS * 2 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.open, undefined, undefined, X_AXIS * 2 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Open', undefined, undefined, X_AXIS * 2 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.open, undefined, undefined, X_AXIS * 2 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
y = Y_AXIS + currentCandle.bodyHeight / 2;
if (y < frameTitleHeight + frameBodyHeight * 0.15) { y = frameTitleHeight + frameBodyHeight * 0.15; }
if (y > frameTitleHeight + frameBodyHeight * 0.80) { y = frameTitleHeight + frameBodyHeight * 0.80; }
UI.projects.superalgos.utilities.drawPrint.printLabel('Close', undefined, undefined, X_AXIS * 7 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.superalgos.utilities.drawPrint.printLabel(currentCandle.innerCandle.close, undefined, undefined, X_AXIS * 7 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel('Close', undefined, undefined, X_AXIS * 7 / 5, y, '0.60', undefined, undefined, 'Center', thisObject.container, thisObject.fitFunction);
UI.projects.foundations.utilities.drawPrint.printLabel(currentCandle.innerCandle.close, undefined, undefined, X_AXIS * 7 / 5, y + frameBodyHeight * 0.05, '1.00', 15, undefined, 'Center', thisObject.container, thisObject.fitFunction);
}
}
Loaded 100 of 3574 files, more files were not shown because too many files have changed in this diff. Show more