Update Workspace.js
This commit is contained in:
1 parent
a762d7bafe
commit
12754e3a39
1 file changed
+11
-2
@@ -411,8 +411,17 @@ function newWorkspace() {
|
||||
}
|
||||
|
||||
function replaceWorkspaceByLoadingOne(name) {
|
||||
let blobService = newFileStorage()
|
||||
blobService.getFileFromHost('LoadWorkspace' + '/' + name, onFileReceived, true)
|
||||
|
||||
let webCommand
|
||||
if (name.indexOf('Included -> ' >= 0)) {
|
||||
name = name.replace('Included -> ', '')
|
||||
webCommand = 'LoadIncludedWorkspace'
|
||||
} else {
|
||||
webCommand = 'LoadWorkspace'
|
||||
}
|
||||
|
||||
let blobService = newFileStorage()
|
||||
blobService.getFileFromHost(webCommand + '/' + name, onFileReceived, true)
|
||||
function onFileReceived(err, text, response) {
|
||||
if (err && err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) {
|
||||
canvas.cockpitSpace.setStatus('Could not load the Workspace called "' + name + '". ', 500, canvas.cockpitSpace.statusTypes.WARNING)
|
||||
|
||||
Reference in new issue
Block a user