Skip to content

Commit 6899842

Browse files
authored
Merge branch 'master' into feature/grouped-jobs
2 parents 2125f51 + 0d18a1b commit 6899842

File tree

13 files changed

+385
-379
lines changed

13 files changed

+385
-379
lines changed

services/static-webserver/client/source/class/osparc/filter/CollaboratorToggleButton.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,38 @@ qx.Class.define("osparc.filter.CollaboratorToggleButton", {
2424
appearance: "tagbutton"
2525
});
2626

27-
if (collaborator["collabType"] === 0) {
28-
this.setLabel(this.tr("Public"));
29-
} else {
30-
let label = collaborator.getLabel();
31-
if ("getEmail" in collaborator && collaborator.getEmail()) {
32-
label += ` (${collaborator.getEmail()})`;
33-
}
34-
this.setLabel(label);
35-
}
36-
37-
if (collaborator.getDescription()) {
38-
const ttt = collaborator.getLabel() + "<br>" + collaborator.getDescription();
39-
this.setToolTipText(ttt);
40-
}
41-
4227
let iconPath = null;
28+
let label = null;
29+
let toolTipText = "";
4330
switch (collaborator["collabType"]) {
4431
case 0:
4532
iconPath = "@FontAwesome5Solid/globe/14";
33+
label = this.tr("Public");
34+
toolTipText = this.tr("Public to all users");
4635
break;
4736
case 1:
4837
iconPath = "@FontAwesome5Solid/users/14";
38+
label = collaborator.getLabel();
39+
toolTipText = collaborator.getDescription();
4940
break;
50-
case 2:
41+
case 2: {
5142
iconPath = "@FontAwesome5Solid/user/14";
43+
label = collaborator.getLabel();
44+
if (collaborator.getEmail()) {
45+
toolTipText += collaborator.getEmail() + "<br>";
46+
}
47+
if (collaborator.getFirstName()) {
48+
toolTipText += [collaborator.getFirstName(), collaborator.getLastName()].join(" ").trim();
49+
}
5250
break;
51+
}
5352
}
5453
this.setIcon(iconPath);
54+
this.setLabel(label);
55+
if (toolTipText) {
56+
const infoButton = new osparc.ui.hint.InfoHint(toolTipText);
57+
this._add(infoButton);
58+
}
5559

5660
this.getChildControl("check");
5761
},

services/static-webserver/client/source/class/osparc/info/MergedLarge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ qx.Class.define("osparc.info.MergedLarge", {
296296
},
297297

298298
__createDescription: function() {
299-
const maxHeight = 400;
300299
const descriptionLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(5).set({
301300
alignY: "middle"
302301
}));
@@ -306,7 +305,8 @@ qx.Class.define("osparc.info.MergedLarge", {
306305
});
307306
descriptionLayout.add(label);
308307

309-
const descriptionContainer = osparc.info.StudyUtils.createDescriptionMD(this.getStudy(), maxHeight);
308+
const maxHeight = 400;
309+
const descriptionContainer = osparc.info.StudyUtils.createDescription(this.getStudy(), maxHeight);
310310
descriptionLayout.add(descriptionContainer);
311311

312312
return descriptionLayout;

0 commit comments

Comments
 (0)