From 12754e3a39b13d8f1c417673e4fa75eafe881aa0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 21 Sep 2020 10:19:07 +0200 Subject: [PATCH] Update Workspace.js --- DesignSpace/Workspace/Workspace.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/DesignSpace/Workspace/Workspace.js b/DesignSpace/Workspace/Workspace.js index b40efe538..037ef7c05 100644 --- a/DesignSpace/Workspace/Workspace.js +++ b/DesignSpace/Workspace/Workspace.js @@ -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)