Skip to content

Commit

Permalink
🐛 [Frontend] Fix for Folders disabled scenario (ITISFoundation#6488)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored and mrnicegyu11 committed Oct 14, 2024
1 parent 0f1ef1d commit e3cfd8b
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -934,20 +934,22 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__connectContexts: function() {
const workspaceHeader = this.__workspaceHeader;
workspaceHeader.addListener("contextChanged", () => {
const workspaceId = workspaceHeader.getCurrentWorkspaceId();
const folderId = workspaceHeader.getCurrentFolderId();
this.__changeContext(workspaceId, folderId);
}, this);
if (osparc.utils.DisabledPlugins.isFoldersEnabled()) {
const workspaceHeader = this.__workspaceHeader;
workspaceHeader.addListener("contextChanged", () => {
const workspaceId = workspaceHeader.getCurrentWorkspaceId();
const folderId = workspaceHeader.getCurrentFolderId();
this.__changeContext(workspaceId, folderId);
}, this);

const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree();
workspacesAndFoldersTree.addListener("contextChanged", e => {
const context = e.getData();
const workspaceId = context["workspaceId"];
const folderId = context["folderId"];
this.__changeContext(workspaceId, folderId);
}, this);
const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree();
workspacesAndFoldersTree.addListener("contextChanged", e => {
const context = e.getData();
const workspaceId = context["workspaceId"];
const folderId = context["folderId"];
this.__changeContext(workspaceId, folderId);
}, this);
}
},

__changeContext: function(workspaceId, folderId) {
Expand Down

0 comments on commit e3cfd8b

Please sign in to comment.