Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -618,7 +618,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
return null;
}

const editButton = new qx.ui.menu.Button(this.tr("Open"));
const editButton = new qx.ui.menu.Button(this.tr("Edit"));
editButton.addListener("execute", () => {
const isStudyCreation = false;
this._startStudyById(templateData["uuid"], null, null, isStudyCreation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ qx.Class.define("osparc.data.Roles", {
statics: {
ORG: {
"noRead": {
id: "noRead",
label: qx.locale.Manager.tr("Restricted Member"),
longLabel: qx.locale.Manager.tr("Restricted member: no Read access"),
canDo: [
Expand All @@ -34,6 +35,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"read": {
id: "read",
label: qx.locale.Manager.tr("Member"),
longLabel: qx.locale.Manager.tr("Member: Read access"),
canDo: [
Expand All @@ -47,6 +49,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"write": {
id: "write",
label: qx.locale.Manager.tr("Manager"),
longLabel: qx.locale.Manager.tr("Manager: Read/Write access"),
canDo: [
Expand All @@ -61,6 +64,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"delete": {
id: "delete",
label: qx.locale.Manager.tr("Administrator"),
longLabel: qx.locale.Manager.tr("Admin: Read/Write/Delete access"),
canDo: [
Expand All @@ -76,6 +80,7 @@ qx.Class.define("osparc.data.Roles", {
// study & templates
STUDY: {
"read": {
id: "read",
label: qx.locale.Manager.tr("User"),
longLabel: qx.locale.Manager.tr("User: Read access"),
canDo: [
Expand All @@ -88,6 +93,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"write": {
id: "write",
label: qx.locale.Manager.tr("Editor"),
longLabel: qx.locale.Manager.tr("Editor: Read/Write access"),
canDo: [
Expand All @@ -101,6 +107,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"delete": {
id: "delete",
label: qx.locale.Manager.tr("Owner"),
longLabel: qx.locale.Manager.tr("Owner: Read/Write/Delete access"),
canDo: [
Expand All @@ -115,6 +122,7 @@ qx.Class.define("osparc.data.Roles", {
},
SERVICES: {
"read": {
id: "read",
label: qx.locale.Manager.tr("User"),
longLabel: qx.locale.Manager.tr("User: Read access"),
canDo: [
Expand All @@ -126,6 +134,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"write": {
id: "write",
label: qx.locale.Manager.tr("Editor"),
longLabel: qx.locale.Manager.tr("Editor: Read/Write access"),
canDo: [
Expand All @@ -140,6 +149,7 @@ qx.Class.define("osparc.data.Roles", {
},
WALLET: {
"read": {
id: "read",
label: qx.locale.Manager.tr("User"),
longLabel: qx.locale.Manager.tr("User: Read access"),
canDo: [
Expand All @@ -152,6 +162,7 @@ qx.Class.define("osparc.data.Roles", {
},
},
"write": {
id: "write",
label: qx.locale.Manager.tr("Accountant"),
longLabel: qx.locale.Manager.tr("Accountant: Read/Write access"),
canDo: [
Expand All @@ -167,13 +178,15 @@ qx.Class.define("osparc.data.Roles", {
},
WORKSPACE: {
"read": {
id: "read",
label: qx.locale.Manager.tr("Viewer"),
longLabel: qx.locale.Manager.tr("Viewer: Read access"),
canDo: [
qx.locale.Manager.tr("- can inspect the content and open ") + osparc.product.Utils.getStudyAlias({plural: true}) + qx.locale.Manager.tr(" without making changes")
]
},
"write": {
id: "write",
label: qx.locale.Manager.tr("Editor"),
longLabel: qx.locale.Manager.tr("Editor: Read/Write access"),
canDo: [
Expand All @@ -182,6 +195,7 @@ qx.Class.define("osparc.data.Roles", {
]
},
"delete": {
id: "delete",
label: qx.locale.Manager.tr("Owner"),
longLabel: qx.locale.Manager.tr("Owner: Read/Write/Delete access"),
canDo: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ qx.Class.define("osparc.jobs.RunsTable", {

__handleButtonClick: function(action, row) {
this.resetSelection();
// In order to make the button tappable again, the cell needs to be unfocused (blurred)
this.resetCellFocus();
const rowData = this.getTableModel().getRowData(row);
switch (action) {
case "info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ qx.Class.define("osparc.jobs.SubRunsTable", {

__handleButtonClick: function(action, row) {
this.resetSelection();
// In order to make the button tappable again, the cell needs to be unfocused (blurred)
this.resetCellFocus();
const rowData = this.getTableModel().getRowData(row);
switch (action) {
case "info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
position: "bottom-right"
});

const accessRights = this.getAccessRights();
let currentRole = this.__getRoleInfo("read");
if (this.self().canDelete(accessRights)) {
currentRole = this.__getRoleInfo("delete");
} else if (this.self().canWrite(accessRights)) {
currentRole = this.__getRoleInfo("write");
const collabAccessRights = this.getAccessRights();
let collabCurrentRole = this.__getRoleInfo("read");
if (this.self().canDelete(collabAccessRights)) {
collabCurrentRole = this.__getRoleInfo("delete");
} else if (this.self().canWrite(collabAccessRights)) {
collabCurrentRole = this.__getRoleInfo("write");
}

// promote/demote actions
switch (currentRole.id) {
switch (collabCurrentRole.id) {
case "read": {
const promoteButton = new qx.ui.menu.Button(this.tr(`Promote to ${this.__getRoleInfo("write").label}`));
promoteButton.addListener("execute", () => {
Expand All @@ -213,15 +213,17 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
}
case "write": {
const resource = this.getResourceType();
const promoteButton = new qx.ui.menu.Button(this.tr(`Promote to ${this.__getRoleInfo("delete").label}`));
promoteButton.setVisibility(resource === "service" ? "excluded" : "visible");
promoteButton.addListener("execute", () => {
this.fireDataEvent("promoteToOwner", {
gid: this.getKey(),
name: this.getTitle()
if (resource !== "service") {
// there is no owner role for services
const promoteButton = new qx.ui.menu.Button(this.tr(`Promote to ${this.__getRoleInfo("delete").label}`));
promoteButton.addListener("execute", () => {
this.fireDataEvent("promoteToOwner", {
gid: this.getKey(),
name: this.getTitle()
});
});
});
menu.add(promoteButton);
menu.add(promoteButton);
}
const demoteButton = new qx.ui.menu.Button(this.tr(`Demote to ${this.__getRoleInfo("read").label}`));
demoteButton.addListener("execute", () => {
this.fireDataEvent("demoteToUser", {
Expand Down Expand Up @@ -249,7 +251,7 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
menu.addSeparator();
}

const removeButton = new qx.ui.menu.Button(this.tr(`Remove ${currentRole.label}`)).set({
const removeButton = new qx.ui.menu.Button(this.tr(`Remove ${collabCurrentRole.label}`)).set({
textColor: "danger-red"
});
removeButton.addListener("execute", () => {
Expand Down
Loading