Skip to content

Commit 8bda78f

Browse files
authored
🐛🎨 [Frontend] Minor fixes: Sharing texts and Remove empty study quick access (ITISFoundation#7024)
1 parent a8ca793 commit 8bda78f

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,6 @@ qx.Class.define("osparc.dashboard.CardBase", {
920920
});
921921
control.addListener("tap", e => {
922922
e.stopPropagation();
923-
this.setValue(false);
924923
this.fireDataEvent("emptyStudyClicked", this.getUuid());
925924
}, this);
926925
return control;

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

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ qx.Class.define("osparc.form.tag.TagItem", {
1414
construct: function() {
1515
this.base(arguments);
1616
this._setLayout(new qx.ui.layout.HBox(5));
17+
this.set({
18+
alignY: "middle",
19+
});
1720
this.__validationManager = new qx.ui.form.validation.Manager();
1821
},
1922

@@ -94,25 +97,26 @@ qx.Class.define("osparc.form.tag.TagItem", {
9497
let control;
9598
switch (id) {
9699
case "tag":
97-
control = new osparc.ui.basic.Tag();
100+
control = new osparc.ui.basic.Tag().set({
101+
alignY: "middle",
102+
});
98103
this.bind("name", control, "value");
99104
this.bind("color", control, "color");
100105
break;
101106
case "description":
102107
control = new qx.ui.basic.Label().set({
103108
rich: true,
104109
allowGrowX: true,
110+
alignY: "middle",
105111
});
106112
this.bind("description", control, "value");
107113
break;
108114
case "shared-icon":
109115
control = new qx.ui.basic.Image().set({
110116
minWidth: 30,
111117
alignY: "middle",
112-
cursor: "pointer",
113118
});
114-
osparc.dashboard.CardBase.populateShareIcon(control, this.getAccessRights())
115-
control.addListener("tap", () => this.__openAccessRights(), this);
119+
osparc.dashboard.CardBase.populateShareIcon(control, this.getAccessRights());
116120
break;
117121
case "name-input":
118122
control = new qx.ui.form.TextField().set({
@@ -202,7 +206,6 @@ qx.Class.define("osparc.form.tag.TagItem", {
202206
this._add(this.getChildControl("description"), {
203207
flex: 1
204208
});
205-
this._add(this.getChildControl("shared-icon"));
206209
this._add(this.__tagItemButtons());
207210
this.resetBackgroundColor();
208211
},
@@ -227,29 +230,40 @@ qx.Class.define("osparc.form.tag.TagItem", {
227230
__tagItemButtons: function() {
228231
const canIWrite = osparc.share.CollaboratorsTag.canIWrite(this.getMyAccessRights());
229232
const canIDelete = osparc.share.CollaboratorsTag.canIDelete(this.getMyAccessRights());
233+
const buttonContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
234+
235+
const sharedIcon = this.getChildControl("shared-icon");
236+
sharedIcon.set({
237+
cursor: canIWrite ? "pointer" : null,
238+
});
239+
if (canIWrite) {
240+
sharedIcon.addListener("tap", () => this.__openAccessRights(), this);
241+
}
242+
buttonContainer.add(sharedIcon);
230243

231-
const buttonContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox());
232244
const editButton = new qx.ui.form.Button().set({
233245
icon: "@FontAwesome5Solid/pencil-alt/12",
234246
toolTipText: this.tr("Edit"),
235247
enabled: canIWrite,
236248
});
249+
buttonContainer.add(editButton);
250+
editButton.addListener("execute", () => this.setMode(this.self().modes.EDIT), this);
251+
237252
const deleteButton = new osparc.ui.form.FetchButton().set({
238253
appearance: "danger-button",
239254
icon: "@FontAwesome5Solid/trash/12",
240255
toolTipText: this.tr("Delete"),
241256
enabled: canIDelete,
242257
});
243-
buttonContainer.add(editButton);
244258
buttonContainer.add(deleteButton);
245-
editButton.addListener("execute", () => this.setMode(this.self().modes.EDIT), this);
246259
deleteButton.addListener("execute", () => {
247260
deleteButton.setFetching(true);
248261
osparc.store.Tags.getInstance().deleteTag(this.getId())
249262
.then(() => this.fireEvent("deleteTag"))
250263
.catch(console.error)
251264
.finally(() => deleteButton.setFetching(false));
252265
}, this);
266+
253267
return buttonContainer;
254268
},
255269
/**

services/static-webserver/client/source/class/osparc/share/AddCollaborators.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ qx.Class.define("osparc.share.AddCollaborators", {
5151
_createChildControlImpl: function(id) {
5252
let control;
5353
switch (id) {
54+
case "intro-text":
55+
control = new qx.ui.basic.Label();
56+
this._addAt(control, 0);
57+
break;
5458
case "buttons-layout":
5559
control = new qx.ui.container.Composite(new qx.ui.layout.HBox());
5660
this._add(control);

services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
5555
},
5656

5757
__renderLayout: function() {
58+
let text = this.__showOrganizations ?
59+
this.tr("Select users or organizations from the list below.") :
60+
this.tr("Select users from the list below.");
61+
text += this.tr("<br>Search them if they aren't listed.");
5862
const introLabel = new qx.ui.basic.Label().set({
59-
value: this.tr("Select users or organizations from the list bellow. Search them if they aren't listed."),
63+
value: text,
6064
rich: true,
6165
wrap: true,
6266
paddingBottom: 5

0 commit comments

Comments
 (0)