Skip to content

Commit e873eb2

Browse files
committed
cleanup
1 parent 4c5f060 commit e873eb2

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonNew.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonNew", {
5757
const title = this.tr("New Workspace");
5858
const win = osparc.ui.window.Window.popUpInWindow(workspaceEditor, title, 500, 500);
5959
workspaceEditor.addListener("workspaceCreated", e => {
60-
win.close();
6160
const newWorkspace = e.getData();
6261
this.fireDataEvent("workspaceCreated", newWorkspace.getWorkspaceId(), this);
6362
});

services/static-webserver/client/source/class/osparc/editor/WorkspaceEditor.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
4242
this.setWorkspace(workspace);
4343
} else {
4444
// creating
45-
this.__creatingWorkspace = true;
4645
this.getChildControl("cancel").addListener("execute", () => {
4746
osparc.store.Workspaces.getInstance().deleteWorkspace(this.getWorkspace().getWorkspaceId())
4847
this.fireEvent("cancel");
@@ -51,6 +50,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
5150
this.__createWorkspace()
5251
.then(newWorkspace => {
5352
this.setWorkspace(newWorkspace);
53+
this.fireDataEvent("workspaceCreated", newWorkspace)
5454
const permissionsView = new osparc.share.CollaboratorsWorkspace(newWorkspace);
5555
permissionsView.addListener("updateAccessRights", () => this.fireDataEvent("updateAccessRights", newWorkspace.getWorkspaceId()), this);
5656
this._addAt(permissionsView, this.self().POS.SHARING);
@@ -109,8 +109,6 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
109109
},
110110

111111
members: {
112-
__creatingWorkspace: null,
113-
114112
_createChildControlImpl: function(id) {
115113
let control;
116114
switch (id) {
@@ -225,13 +223,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
225223
thumbnail: this.getThumbnail(),
226224
};
227225
osparc.store.Workspaces.getInstance().putWorkspace(this.getWorkspace().getWorkspaceId(), updateData)
228-
.then(() => {
229-
if (this.__creatingWorkspace) {
230-
this.fireDataEvent("workspaceCreated", this.getWorkspace())
231-
} else {
232-
this.fireEvent("workspaceUpdated");
233-
}
234-
})
226+
.then(() => this.fireEvent("workspaceUpdated"))
235227
.catch(err => {
236228
console.error(err);
237229
osparc.FlashMessenger.logAs(err.message, "ERROR");

0 commit comments

Comments
 (0)