Fixes to allow a new Project to have globals without UI components
This commit is contained in:
1 parent
fc716b9d95
commit
85cc9c2c3d
11 files changed
+61
-32
No files matched your search
@@ -16,7 +16,7 @@ function newWorkspace() {
|
||||
save: saveWorkspace,
|
||||
backup: backupWorkspace,
|
||||
share: shareWorkspace,
|
||||
getNodesByTypeAndHierarchyHeadsType: getNodesByTypeAndHierarchyHeadsType,
|
||||
getNodesByTypeAndHierarchyHeadsType: getNodesByTypeAndHierarchyHeadsType,
|
||||
getProjectsHeads: getProjectsHeads,
|
||||
getHierarchyHeads: getHierarchyHeads,
|
||||
getHierarchyHeadsById: getHierarchyHeadsById,
|
||||
@@ -70,8 +70,12 @@ function newWorkspace() {
|
||||
/* Set up the action switches map */
|
||||
for (let i = 0; i < PROJECTS_SCHEMA.length; i++) {
|
||||
let project = PROJECTS_SCHEMA[i].name
|
||||
let actionSwitch = eval('new' + project + 'ActionSwitch()')
|
||||
actionSwitchesByProject.set(project, actionSwitch)
|
||||
try {
|
||||
let actionSwitch = eval('new' + project + 'ActionSwitch()')
|
||||
actionSwitchesByProject.set(project, actionSwitch)
|
||||
} catch (err) {
|
||||
console.log('[WARN] Action Switch for project ' + project + ' not found.')
|
||||
}
|
||||
}
|
||||
|
||||
/* Check which was the last workspace. */
|
||||
@@ -157,9 +161,9 @@ function newWorkspace() {
|
||||
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
|
||||
|
||||
/* Validation if it is too early to save. */
|
||||
if (thisObject.isInitialized === false) {
|
||||
if (thisObject.isInitialized === false) {
|
||||
console.log('Workspace not saved because it has not been initialized. =')
|
||||
return
|
||||
return
|
||||
}
|
||||
|
||||
/* Validation of 2 sessions opened at the same time. */
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
exports.newNetworkGlobalsQueryConstants = function () {
|
||||
|
||||
let thisObject = {
|
||||
INITIAL_INDEX_FIRST: 'First',
|
||||
INITIAL_INDEX_LAST: 'Last',
|
||||
MIN_AMOUNT_REQUESTED: 1,
|
||||
MAX_AMOUNT_REQUESTED: 100,
|
||||
DIRECTION_FUTURE: 'Future',
|
||||
DIRECTION_PAST: 'Past'
|
||||
}
|
||||
|
||||
return thisObject
|
||||
}
|
||||
@@ -1267,5 +1267,19 @@
|
||||
"Features",
|
||||
"Positions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"propertyName": "network",
|
||||
"NT": {
|
||||
"globals": [
|
||||
{
|
||||
"name": "Query Constants",
|
||||
"propertyName": "queryConstants",
|
||||
"functionName": "newNetworkGlobalsQueryConstants",
|
||||
"fileName": "QueryConstants.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user