Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
control.getContentElement().setStyles({
"border-radius": `${osparc.dashboard.ListButtonItem.MENU_BTN_DIMENSIONS / 2}px`
});
osparc.utils.Utils.setIdToWidget(control, "folderItemMenuButton");
this._add(control, osparc.dashboard.FolderButtonBase.POS.MENU);
break;
}
Expand All @@ -146,6 +147,8 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
folder.bind("name", this, "title");
folder.bind("lastModified", this, "lastModified");

osparc.utils.Utils.setIdToWidget(this, "folderItem_" + folder.getFolderId());

this.__addMenuButton();
},

Expand Down Expand Up @@ -211,11 +214,13 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {

const moveToButton = new qx.ui.menu.Button(this.tr("Move to..."), "@FontAwesome5Solid/folder/12");
moveToButton.addListener("execute", () => this.fireDataEvent("moveFolderToRequested", this.getFolderId()), this);
osparc.utils.Utils.setIdToWidget(moveToButton, "moveFolderMenuItem");
menu.add(moveToButton);

menu.addSeparator();

const deleteButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
osparc.utils.Utils.setIdToWidget(deleteButton, "deleteFolderMenuItem");
deleteButton.addListener("execute", () => this.__deleteFolderRequested(), this);
menu.add(deleteButton);
}
Expand Down Expand Up @@ -264,6 +269,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
confirmText: this.tr("Delete"),
confirmAction: "delete"
});
osparc.utils.Utils.setIdToWidget(confirmationWin.getConfirmButton(), "confirmDeleteFolderButton");
confirmationWin.center();
confirmationWin.open();
confirmationWin.addListener("close", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ qx.Class.define("osparc.dashboard.FolderButtonNew", {
this.setPriority(osparc.dashboard.CardBase.CARD_PRIORITY.NEW);

this.__buildLayout();

osparc.utils.Utils.setIdToWidget(this, "newFolderButton");
},

events: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
control.getContentElement().setStyles({
"border-radius": `${this.self().MENU_BTN_DIMENSIONS / 2}px`
});
osparc.utils.Utils.setIdToWidget(control, "workspaceItemMenuButton");
layout = this.getChildControl("header");
layout.addAt(control, osparc.dashboard.WorkspaceButtonBase.HPOS.MENU);
break;
Expand Down Expand Up @@ -159,6 +160,8 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
workspace.bind("accessRights", this, "accessRights");
workspace.bind("modifiedAt", this, "modifiedAt");
workspace.bind("myAccessRights", this, "myAccessRights");

osparc.utils.Utils.setIdToWidget(this, "workspaceItem_" + workspace.getWorkspaceId());
},

__applyTitle: function(value) {
Expand Down Expand Up @@ -201,6 +204,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
menu.addSeparator();

const deleteButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
osparc.utils.Utils.setIdToWidget(deleteButton, "deleteWorkspaceMenuItem");
deleteButton.addListener("execute", () => this.__deleteWorkspaceRequested(), this);
menu.add(deleteButton);

Expand Down Expand Up @@ -254,6 +258,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
confirmText: this.tr("Delete"),
confirmAction: "delete"
});
osparc.utils.Utils.setIdToWidget(confirmationWin.getConfirmButton(), "confirmDeleteWorkspaceButton");
confirmationWin.center();
confirmationWin.open();
confirmationWin.addListener("close", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonNew", {
opacity: 1
});
this.getChildControl("footer").exclude();

osparc.utils.Utils.setIdToWidget(this, "newWorkspaceButton");
},

events: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ qx.Class.define("osparc.editor.FolderEditor", {
placeholder: this.tr("Title"),
height: 27
});
osparc.utils.Utils.setIdToWidget(control, "folderEditorTitle");
this.bind("label", control, "value");
control.bind("value", this, "label");
this._add(control);
Expand All @@ -78,6 +79,7 @@ qx.Class.define("osparc.editor.FolderEditor", {
this.fireEvent("createFolder");
}
}, this);
osparc.utils.Utils.setIdToWidget(control, "folderEditorCreate");
buttons.addAt(control, 1);
break;
}
Expand All @@ -94,6 +96,7 @@ qx.Class.define("osparc.editor.FolderEditor", {
this.fireEvent("updateFolder");
}
}, this);
osparc.utils.Utils.setIdToWidget(control, "folderEditorSave");
buttons.addAt(control, 1);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
placeholder: this.tr("Title"),
height: 30,
});
osparc.utils.Utils.setIdToWidget(control, "workspaceEditorTitle");
this.bind("label", control, "value");
control.bind("value", this, "label");
this._addAt(control, this.self().POS.TITLE);
Expand Down Expand Up @@ -170,6 +171,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
control = new osparc.ui.form.FetchButton(this.tr("Save")).set({
appearance: "form-button"
});
osparc.utils.Utils.setIdToWidget(control, "workspaceEditorSave");
control.addListener("execute", () => this.__saveWorkspace(control), this);
buttons.addAt(control, 1);
break;
Expand Down
Loading