Governance Tab Implemented
This commit is contained in:
1 parent
b5830d65f6
commit
49fbc67d29
8 files changed
+101
-54
No files matched your search
@@ -171,11 +171,8 @@ function newEducationDocSpace() {
|
||||
}
|
||||
|
||||
function setupSidePanelTab() {
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.tabIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Education', 'docs-tab')
|
||||
thisObject.sidePanelTab.tabLabel = 'Docs'
|
||||
thisObject.sidePanelTab.initialize('right')
|
||||
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Education', 'docs-tab', 'Docs', 'right')
|
||||
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
|
||||
@@ -437,7 +434,6 @@ function newEducationDocSpace() {
|
||||
}
|
||||
|
||||
function physics() {
|
||||
thisObject.sidePanelTab.physics()
|
||||
docsAppDivPhysics()
|
||||
|
||||
function docsAppDivPhysics() {
|
||||
@@ -461,7 +457,6 @@ function newEducationDocSpace() {
|
||||
if (CAN_SPACES_DRAW === false) { return }
|
||||
if (isInitialized === false) { return }
|
||||
borders()
|
||||
thisObject.sidePanelTab.draw()
|
||||
}
|
||||
|
||||
function borders() {
|
||||
|
||||
@@ -31,10 +31,9 @@ function newFoundationsChatSpace() {
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.initialize('right', 1)
|
||||
return
|
||||
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Education', 'docs-tab', 'Docs', 'right')
|
||||
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
|
||||
@@ -89,15 +88,14 @@ function newFoundationsChatSpace() {
|
||||
return thisObject.container
|
||||
} else {
|
||||
UI.projects.foundations.spaces.chartingSpace.viewport.onMouseWheel(event)
|
||||
return
|
||||
return
|
||||
}
|
||||
} else {
|
||||
return
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
function physics() {
|
||||
thisObject.sidePanelTab.physics()
|
||||
chatAppDivPhysics()
|
||||
iFramePhysics()
|
||||
|
||||
@@ -108,18 +106,18 @@ function newFoundationsChatSpace() {
|
||||
y: 0
|
||||
}
|
||||
chatAppDivPosition = thisObject.container.frame.frameThisPoint(chatAppDivPosition)
|
||||
chatAppDiv.style = ' ' +
|
||||
'position:fixed; top:' + chatAppDivPosition.y + 'px; ' +
|
||||
'left:' + chatAppDivPosition.x + 'px; z-index:1; ' +
|
||||
'width: ' + thisObject.container.frame.width + 'px;' +
|
||||
'height: ' + thisObject.container.frame.height + 'px'
|
||||
chatAppDiv.style = ' ' +
|
||||
'position:fixed; top:' + chatAppDivPosition.y + 'px; ' +
|
||||
'left:' + chatAppDivPosition.x + 'px; z-index:1; ' +
|
||||
'width: ' + thisObject.container.frame.width + 'px;' +
|
||||
'height: ' + thisObject.container.frame.height + 'px'
|
||||
}
|
||||
|
||||
function iFramePhysics() {
|
||||
let docIFrame = document.getElementById('chatIFrame')
|
||||
docIFrame.style = ' ' +
|
||||
'width: ' + thisObject.container.frame.width + 'px;' +
|
||||
'height: ' + thisObject.container.frame.height + 'px'
|
||||
docIFrame.style = ' ' +
|
||||
'width: ' + thisObject.container.frame.width + 'px;' +
|
||||
'height: ' + thisObject.container.frame.height + 'px'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +125,6 @@ function newFoundationsChatSpace() {
|
||||
if (CAN_SPACES_DRAW === false) { return }
|
||||
if (isInitialized === false) { return }
|
||||
borders()
|
||||
thisObject.sidePanelTab.draw()
|
||||
}
|
||||
|
||||
function borders() {
|
||||
|
||||
@@ -126,7 +126,7 @@ function newSidePanelTab() {
|
||||
}
|
||||
|
||||
function positionPhysics() {
|
||||
thisObject.container.frame.position.y = browserCanvas.height / 2 - TAB_HEIGHT / 2
|
||||
thisObject.container.frame.position.y = browserCanvas.height / 2 - TAB_HEIGHT / 2 + thisObject.index * (TAB_HEIGHT - 1)
|
||||
}
|
||||
|
||||
function draw() {
|
||||
|
||||
@@ -2,9 +2,11 @@ function newFoundationsSideSpace() {
|
||||
let thisObject = {
|
||||
sidePanelTab: undefined,
|
||||
container: undefined,
|
||||
leftTabs: undefined,
|
||||
rightTabs: undefined,
|
||||
physics: physics,
|
||||
draw: draw,
|
||||
getSidePanelTab, getSidePanelTab,
|
||||
createSidePanelTab, createSidePanelTab,
|
||||
getContainer: getContainer,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
@@ -13,15 +15,39 @@ function newFoundationsSideSpace() {
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
|
||||
leftTabs = []
|
||||
rightTabs = []
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
leftTabs = undefined
|
||||
rightTabs = undefined
|
||||
}
|
||||
|
||||
function getSidePanelTab() {
|
||||
function createSidePanelTab(container, porject, iconName, label, side) {
|
||||
|
||||
let sidePanel
|
||||
|
||||
sidePanel = newSidePanelTab()
|
||||
sidePanel.container.connectToParent(container, false, false)
|
||||
sidePanel.tabIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(porject, iconName)
|
||||
sidePanel.tabLabel = label
|
||||
sidePanel.initialize(side)
|
||||
|
||||
switch (side) {
|
||||
case 'left': {
|
||||
leftTabs.push(sidePanel)
|
||||
sidePanel.index = leftTabs.length
|
||||
break
|
||||
}
|
||||
case 'right': {
|
||||
rightTabs.push(sidePanel)
|
||||
sidePanel.index = rightTabs.length
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return sidePanel
|
||||
}
|
||||
|
||||
function getContainer(point, purpose) {
|
||||
@@ -29,10 +55,24 @@ function newFoundationsSideSpace() {
|
||||
}
|
||||
|
||||
function physics() {
|
||||
|
||||
for (let i = 0; i < leftTabs.length; i++) {
|
||||
let sideTab = leftTabs[i]
|
||||
sideTab.physics()
|
||||
}
|
||||
for (let i = 0; i < rightTabs.length; i++) {
|
||||
let sideTab = rightTabs[i]
|
||||
sideTab.physics()
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
|
||||
for (let i = 0; i < leftTabs.length; i++) {
|
||||
let sideTab = leftTabs[i]
|
||||
sideTab.draw()
|
||||
}
|
||||
for (let i = 0; i < rightTabs.length; i++) {
|
||||
let sideTab = rightTabs[i]
|
||||
sideTab.draw()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,8 @@ function newFoundationsWorkspaceSpace() {
|
||||
return thisObject
|
||||
|
||||
function initialize() {
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.tabIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'workspace')
|
||||
thisObject.sidePanelTab.tabLabel = 'Workspaces'
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.initialize('left')
|
||||
|
||||
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Foundations', 'workspace', 'Workspaces', 'left')
|
||||
|
||||
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
|
||||
|
||||
@@ -89,7 +86,6 @@ function newFoundationsWorkspaceSpace() {
|
||||
}
|
||||
|
||||
function physics() {
|
||||
thisObject.sidePanelTab.physics()
|
||||
listView.physics()
|
||||
}
|
||||
|
||||
@@ -97,7 +93,6 @@ function newFoundationsWorkspaceSpace() {
|
||||
if (CAN_SPACES_DRAW === false) { return }
|
||||
if (isInitialized === false) { return }
|
||||
borders()
|
||||
thisObject.sidePanelTab.draw()
|
||||
listView.draw()
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
function newGovernanceGlobalsReports() {
|
||||
let thisObject = {
|
||||
REPORTS_SPACE_WIDTH: 900
|
||||
}
|
||||
return thisObject
|
||||
}
|
||||
+20
-12
@@ -1,5 +1,5 @@
|
||||
function newGobernanceAssetsSpace() {
|
||||
const MODULE_NAME = 'Assets Space'
|
||||
function newGobernanceReportsSpace() {
|
||||
const MODULE_NAME = 'Reports Space'
|
||||
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
@@ -12,8 +12,18 @@ function newGobernanceAssetsSpace() {
|
||||
}
|
||||
|
||||
thisObject.container = newContainer()
|
||||
thisObject.container.initialize(MODULE_NAME)
|
||||
thisObject.container.name = MODULE_NAME
|
||||
thisObject.container.initialize()
|
||||
thisObject.container.isClickeable = true
|
||||
thisObject.container.isDraggeable = false
|
||||
thisObject.container.detectMouseOver = true
|
||||
thisObject.container.status = 'hidden'
|
||||
|
||||
resize()
|
||||
|
||||
let browserResizedEventSubscriptionId
|
||||
let openingEventSubscriptionId
|
||||
let closingEventSubscriptionId
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -27,15 +37,13 @@ function newGobernanceAssetsSpace() {
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
|
||||
setupSidePanelTab()
|
||||
|
||||
function setupSidePanelTab() {
|
||||
thisObject.sidePanelTab = newSidePanelTab()
|
||||
thisObject.sidePanelTab.container.connectToParent(thisObject.container, false, false)
|
||||
thisObject.sidePanelTab.tabIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Governance', 'governance-tab')
|
||||
thisObject.sidePanelTab.tabLabel = 'Governance'
|
||||
thisObject.sidePanelTab.initialize('right')
|
||||
|
||||
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Governance', 'governance-tab', 'Governance', 'right')
|
||||
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
|
||||
@@ -44,7 +52,7 @@ function newGobernanceAssetsSpace() {
|
||||
}
|
||||
|
||||
function resize() {
|
||||
thisObject.container.frame.width = UI.projects.education.globals.docs.DOCS_SPACE_WIDTH
|
||||
thisObject.container.frame.width = UI.projects.governance.globals.reports.REPORTS_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
|
||||
@@ -56,7 +64,7 @@ function newGobernanceAssetsSpace() {
|
||||
|
||||
function physics() {
|
||||
if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return }
|
||||
thisObject.sidePanelTab.physics()
|
||||
|
||||
}
|
||||
|
||||
function getContainer(point, purpose) {
|
||||
@@ -82,6 +90,6 @@ function newGobernanceAssetsSpace() {
|
||||
}
|
||||
|
||||
function draw() {
|
||||
thisObject.sidePanelTab.draw()
|
||||
|
||||
}
|
||||
}
|
||||
@@ -969,7 +969,13 @@
|
||||
"name": "Governance",
|
||||
"propertyName": "governance",
|
||||
"UI": {
|
||||
"globals": [],
|
||||
"globals": [
|
||||
{
|
||||
"name": "Reports",
|
||||
"propertyName": "reports",
|
||||
"functionName": "newGovernanceGlobalsReports"
|
||||
}
|
||||
],
|
||||
"functionLibraries": [
|
||||
{
|
||||
"name": "Assets",
|
||||
@@ -1079,10 +1085,10 @@
|
||||
"onMouseDownIndex": 0
|
||||
},
|
||||
{
|
||||
"name": "Assets Space",
|
||||
"folderName": "Assets-Space",
|
||||
"propertyName": "assetsSpace",
|
||||
"functionName": "newGobernanceAssetsSpace",
|
||||
"name": "Reports Space",
|
||||
"folderName": "Reports-Space",
|
||||
"propertyName": "reportsSpace",
|
||||
"functionName": "newGobernanceReportsSpace",
|
||||
"initializationIndex": 1,
|
||||
"animationPhysicsIndex": 1,
|
||||
"animationDrawIndex": 1,
|
||||
|
||||
Reference in new issue
Block a user