Skip to content

Commit

Permalink
[skip ci] share-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Jan 6, 2025
1 parent 01eabbe commit 82855c0
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ qx.Class.define("osparc.form.tag.TagItem", {
check: "String",
init: "display",
nullable: false,
apply: "_applyMode"
apply: "__applyMode"
},

appearance: {
Expand Down Expand Up @@ -101,6 +101,20 @@ qx.Class.define("osparc.form.tag.TagItem", {
});
this.bind("description", control, "value");
break;
case "shared-icon":
control = new qx.ui.basic.Image().set({
minWidth: 30,
alignY: "middle"
});
this.addListener("changeAccessRights", e => {
const accessRights = e.getData();
console.log(accessRights);
if (accessRights) {
osparc.dashboard.CardBase.populateShareIcon(control, accessRights);
}
}, this);
control.addListener("tap", e => this.__openAccessRights(), this);
break;
case "name-input":
control = new qx.ui.form.TextField().set({
required: true
Expand Down Expand Up @@ -186,10 +200,15 @@ 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();
},

__openAccessRights: function() {

},

/**
* Generates and returns the buttons for deleting and editing an existing label (display mode)
*/
Expand Down Expand Up @@ -296,7 +315,7 @@ qx.Class.define("osparc.form.tag.TagItem", {
color: color
};
},
_applyMode: function() {
__applyMode: function() {
this.__renderLayout();
}
}
Expand Down

0 comments on commit 82855c0

Please sign in to comment.