Skip to content

Commit 06095a2

Browse files
committed
[skip ci] browserContext
1 parent e3f6ffc commit 06095a2

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
11511151
// notify header
11521152
const header = this.__header;
11531153
header.set({
1154-
currentContext: context,
11551154
currentWorkspaceId: workspaceId,
11561155
currentFolderId: folderId,
11571156
});

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
3939

4040
this.initCurrentWorkspaceId();
4141
this.initCurrentFolderId();
42+
43+
osparc.store.Store.getInstance().addListener("changeStudyBrowserContext", () => this.__buildLayout(), this);
4244
},
4345

4446
events: {
@@ -49,14 +51,6 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
4951
},
5052

5153
properties: {
52-
currentContext: {
53-
check: ["studiesAndFolders", "workspaces", "search", "trash"],
54-
nullable: false,
55-
init: "studiesAndFolders",
56-
event: "changeCurrentContext",
57-
apply: "__buildLayout"
58-
},
59-
6054
currentWorkspaceId: {
6155
check: "Number",
6256
nullable: true,
@@ -236,7 +230,8 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
236230
description.resetValue();
237231
this.getChildControl("empty-trash-button").exclude();
238232

239-
switch (this.getCurrentContext()) {
233+
const currentContext = osparc.store.Store.getInstance().getStudyBrowserContext();
234+
switch (currentContext) {
240235
case "studiesAndFolders": {
241236
const workspaceId = this.getCurrentWorkspaceId();
242237
title.setCursor("pointer");

0 commit comments

Comments
 (0)