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 @@ -920,7 +920,6 @@ qx.Class.define("osparc.dashboard.CardBase", {
});
control.addListener("tap", e => {
e.stopPropagation();
this.setValue(false);
this.fireDataEvent("emptyStudyClicked", this.getUuid());
}, this);
return control;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ qx.Class.define("osparc.form.tag.TagItem", {
construct: function() {
this.base(arguments);
this._setLayout(new qx.ui.layout.HBox(5));
this.set({
alignY: "middle",
});
this.__validationManager = new qx.ui.form.validation.Manager();
},

Expand Down Expand Up @@ -94,25 +97,26 @@ qx.Class.define("osparc.form.tag.TagItem", {
let control;
switch (id) {
case "tag":
control = new osparc.ui.basic.Tag();
control = new osparc.ui.basic.Tag().set({
alignY: "middle",
});
this.bind("name", control, "value");
this.bind("color", control, "color");
break;
case "description":
control = new qx.ui.basic.Label().set({
rich: true,
allowGrowX: true,
alignY: "middle",
});
this.bind("description", control, "value");
break;
case "shared-icon":
control = new qx.ui.basic.Image().set({
minWidth: 30,
alignY: "middle",
cursor: "pointer",
});
osparc.dashboard.CardBase.populateShareIcon(control, this.getAccessRights())
control.addListener("tap", () => this.__openAccessRights(), this);
osparc.dashboard.CardBase.populateShareIcon(control, this.getAccessRights());
break;
case "name-input":
control = new qx.ui.form.TextField().set({
Expand Down Expand Up @@ -202,7 +206,6 @@ qx.Class.define("osparc.form.tag.TagItem", {
this._add(this.getChildControl("description"), {
flex: 1
});
this._add(this.getChildControl("shared-icon"));
this._add(this.__tagItemButtons());
this.resetBackgroundColor();
},
Expand All @@ -227,29 +230,40 @@ qx.Class.define("osparc.form.tag.TagItem", {
__tagItemButtons: function() {
const canIWrite = osparc.share.CollaboratorsTag.canIWrite(this.getMyAccessRights());
const canIDelete = osparc.share.CollaboratorsTag.canIDelete(this.getMyAccessRights());
const buttonContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));

const sharedIcon = this.getChildControl("shared-icon");
sharedIcon.set({
cursor: canIWrite ? "pointer" : null,
});
if (canIWrite) {
sharedIcon.addListener("tap", () => this.__openAccessRights(), this);
}
buttonContainer.add(sharedIcon);

const buttonContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox());
const editButton = new qx.ui.form.Button().set({
icon: "@FontAwesome5Solid/pencil-alt/12",
toolTipText: this.tr("Edit"),
enabled: canIWrite,
});
buttonContainer.add(editButton);
editButton.addListener("execute", () => this.setMode(this.self().modes.EDIT), this);

const deleteButton = new osparc.ui.form.FetchButton().set({
appearance: "danger-button",
icon: "@FontAwesome5Solid/trash/12",
toolTipText: this.tr("Delete"),
enabled: canIDelete,
});
buttonContainer.add(editButton);
buttonContainer.add(deleteButton);
editButton.addListener("execute", () => this.setMode(this.self().modes.EDIT), this);
deleteButton.addListener("execute", () => {
deleteButton.setFetching(true);
osparc.store.Tags.getInstance().deleteTag(this.getId())
.then(() => this.fireEvent("deleteTag"))
.catch(console.error)
.finally(() => deleteButton.setFetching(false));
}, this);

return buttonContainer;
},
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ qx.Class.define("osparc.share.AddCollaborators", {
_createChildControlImpl: function(id) {
let control;
switch (id) {
case "intro-text":
control = new qx.ui.basic.Label();
this._addAt(control, 0);
break;
case "buttons-layout":
control = new qx.ui.container.Composite(new qx.ui.layout.HBox());
this._add(control);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
},

__renderLayout: function() {
let text = this.__showOrganizations ?
this.tr("Select users or organizations from the list below.") :
this.tr("Select users from the list below.");
text += this.tr("<br>Search them if they aren't listed.");
const introLabel = new qx.ui.basic.Label().set({
value: this.tr("Select users or organizations from the list bellow. Search them if they aren't listed."),
value: text,
rich: true,
wrap: true,
paddingBottom: 5
Expand Down
Loading