Ready to reorganize into different files
This commit is contained in:
1 parent
63e0109fcd
commit
3f2bd1c673
7 files changed
+131
-19
No files matched your search
@@ -1,6 +1,4 @@
|
||||
|
||||
function newSuperalgosDesignSpace() {
|
||||
const MODULE_NAME = 'Designe Space'
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
iconsByProjectAndName: undefined,
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
function newSuperalgosDocSpace() {
|
||||
const MODULE_NAME = 'Doc Space'
|
||||
let thisObject = {
|
||||
changeLanguage: changeLanguage,
|
||||
isVisible: undefined,
|
||||
sidePanelTab: undefined,
|
||||
container: undefined,
|
||||
searchEngine: undefined,
|
||||
mainSearchPage: undefined,
|
||||
searchResultsPage: undefined,
|
||||
footer: undefined,
|
||||
documentPage: undefined,
|
||||
changeLanguage: changeLanguage,
|
||||
openSpaceAreaAndNavigateTo: openSpaceAreaAndNavigateTo,
|
||||
navigateTo: navigateTo,
|
||||
scrollToElement: scrollToElement,
|
||||
@@ -54,28 +59,43 @@ function newSuperalgosDocSpace() {
|
||||
|
||||
function initialize() {
|
||||
docsIndex = []
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.initialize('right')
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
|
||||
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
|
||||
setupSidePanelTab()
|
||||
setUpContextMenu()
|
||||
setUpMenuItemsMap()
|
||||
setupUserLanguage()
|
||||
|
||||
/*
|
||||
Getting the used preferred languague
|
||||
*/
|
||||
if (window.localStorage.getItem('Docs Language') !== null && window.localStorage.getItem('Docs Language') !== undefined && window.localStorage.getItem('Docs Language') !== 'undefined') {
|
||||
language = window.localStorage.getItem('Docs Language')
|
||||
} else {
|
||||
window.localStorage.setItem('Docs Language', DEFAULT_LANGUAGE)
|
||||
language = DEFAULT_LANGUAGE
|
||||
}
|
||||
thisObject.searchEngine = newSuperalgosDocsSearchEngine()
|
||||
thisObject.mainSearchPage = newSuperalgosDocsMainSearchPage()
|
||||
thisObject.searchResultsPage = newSuperalgosDocsSearchResultsPage()
|
||||
thisObject.documentPage = newSuperalgosDocsDocumentPage()
|
||||
thisObject.footer = newSuperalgosDocsFooter()
|
||||
|
||||
isInitialized = true
|
||||
|
||||
function setupUserLanguage() {
|
||||
/*
|
||||
Getting the used preferred languague
|
||||
*/
|
||||
if (window.localStorage.getItem('Docs Language') !== null && window.localStorage.getItem('Docs Language') !== undefined && window.localStorage.getItem('Docs Language') !== 'undefined') {
|
||||
language = window.localStorage.getItem('Docs Language')
|
||||
} else {
|
||||
window.localStorage.setItem('Docs Language', DEFAULT_LANGUAGE)
|
||||
language = DEFAULT_LANGUAGE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setupSidePanelTab() {
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.initialize('right')
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
|
||||
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
|
||||
}
|
||||
|
||||
function setUpContextMenu() {
|
||||
window.contextMenu = {
|
||||
editParagraph: editParagraph,
|
||||
@@ -386,6 +406,18 @@ function newSuperalgosDocSpace() {
|
||||
thisObject.sidePanelTab.container.eventHandler.stopListening(openingEventSubscriptionId)
|
||||
thisObject.sidePanelTab.container.eventHandler.stopListening(closingEventSubscriptionId)
|
||||
|
||||
thisObject.searchEngine.finalize()
|
||||
thisObject.mainSearchPage.finalize()
|
||||
thisObject.searchResultsPage.finalize()
|
||||
thisObject.documentPage.finalize()
|
||||
thisObject.footer.finalize()
|
||||
|
||||
thisObject.searchEngine = undefined
|
||||
thisObject.mainSearchPage = undefined
|
||||
thisObject.searchResultsPage = undefined
|
||||
thisObject.documentPage = undefined
|
||||
thisObject.footer = undefined
|
||||
|
||||
objectBeingRendered = undefined
|
||||
paragraphMap = undefined
|
||||
appSchemaDocument = undefined
|
||||
@@ -393,6 +425,8 @@ function newSuperalgosDocSpace() {
|
||||
menuLabelsMap = undefined
|
||||
docsIndex = undefined
|
||||
isInitialized = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
function reset() {
|
||||
@@ -2075,7 +2109,7 @@ function newSuperalgosDocSpace() {
|
||||
}
|
||||
}
|
||||
if (objectBeingRendered.category === 'Node') {
|
||||
autoGeneratedHtml()
|
||||
autoGeneratedHtml()
|
||||
}
|
||||
HTML = HTML + '</div>' // Content Ends
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
function newSuperalgosDocsDocumentPage() {
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
function newSuperalgosDocsFooter() {
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
function newSuperalgosDocsMainSearchPage() {
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
function newSuperalgosDocsSearchEngine() {
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
function newSuperalgosDocsSearchResultsPage() {
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user