Skip to content

Commit

Permalink
🐛 [Frontend] Fix: allow moving to root folder (#6615)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Oct 28, 2024
1 parent 59f0725 commit f870beb
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {

_moveFolderToRequested: function(folderId) {
const currentWorkspaceId = this.getCurrentWorkspaceId();
const currentFolderId = this.getCurrentWorkspaceId();
const currentFolderId = this.getCurrentFolderId();
const moveFolderTo = new osparc.dashboard.MoveResourceTo(currentWorkspaceId, currentFolderId);
const title = this.tr("Move to...");
const win = osparc.ui.window.Window.popUpInWindow(moveFolderTo, title, 400, 400);
Expand All @@ -481,7 +481,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
const destWorkspaceId = data["workspaceId"];
const destFolderId = data["folderId"];
if (destWorkspaceId !== currentWorkspaceId) {
const msg = this.tr("Coming soon");
const msg = this.tr("Moving folders to Shared Workspaces are coming soon");
osparc.FlashMessenger.getInstance().logAs(msg, "WARNING");
return;
}
Expand All @@ -504,6 +504,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
}, this);
}
});
moveFolderTo.addListener("cancel", () => win.close());
},

__moveFolderToWorkspace: function(folderId, destWorkspaceId) {
Expand Down Expand Up @@ -1415,7 +1416,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
moveToButton["moveToButton"] = true;
moveToButton.addListener("tap", () => {
const currentWorkspaceId = this.getCurrentWorkspaceId();
const currentFolderId = this.getCurrentWorkspaceId();
const currentFolderId = this.getCurrentFolderId();
const moveStudyTo = new osparc.dashboard.MoveResourceTo(currentWorkspaceId, currentFolderId);
const title = this.tr("Move to...");
const win = osparc.ui.window.Window.popUpInWindow(moveStudyTo, title, 400, 400);
Expand Down

0 comments on commit f870beb

Please sign in to comment.