Skip to content

Commit 7b555a8

Browse files
committed
modeling
1 parent baa4bf5 commit 7b555a8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

services/static-webserver/client/source/class/osparc/form/tag/TagManager.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,21 @@ qx.Class.define("osparc.form.tag.TagManager", {
124124
},
125125

126126
__tagButton: function(tag) {
127-
const tagButton = new osparc.form.tag.TagToggleButton(tag, this.__selectedTags.includes(tag.id));
127+
const tagId = tag.getTagId();
128+
const tagButton = new osparc.form.tag.TagToggleButton(tag, this.__selectedTags.includes(tagId));
128129
tagButton.addListener("changeValue", evt => {
129130
const selected = evt.getData();
130131
if (this.isLiveUpdate()) {
131132
tagButton.setFetching(true);
132133
if (selected) {
133-
this.__saveAddTag(tag.id, tagButton);
134+
this.__saveAddTag(tagId, tagButton);
134135
} else {
135-
this.__saveRemoveTag(tag.id, tagButton);
136+
this.__saveRemoveTag(tagId, tagButton);
136137
}
137138
} else if (selected) {
138-
this.__selectedTags.push(tag.id);
139+
this.__selectedTags.push(tagId);
139140
} else {
140-
this.__selectedTags.remove(tag.id);
141+
this.__selectedTags.remove(tagId);
141142
}
142143
}, this);
143144
tagButton.subscribeToFilterGroup("studyBrowserTagManager");

services/static-webserver/client/source/class/osparc/form/tag/TagToggleButton.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ qx.Class.define("osparc.form.tag.TagToggleButton", {
2323
appearance: "tagbutton"
2424
});
2525
this.setIcon("@FontAwesome5Solid/square/14");
26-
this.getChildControl("icon").setTextColor(tag.color);
27-
if (tag.description) {
28-
this.setLabel(tag.name + " : " + tag.description);
26+
this.getChildControl("icon").setTextColor(tag.getColor());
27+
if (tag.getDescription()) {
28+
this.setLabel(tag.getName() + " : " + tag.getDescription());
2929
} else {
30-
this.setLabel(tag.name);
30+
this.setLabel(tag.getName());
3131
}
3232
this.getChildControl("check");
3333

0 commit comments

Comments
 (0)