Skip to content

Commit 41feca4

Browse files
committed
right icon
1 parent ef25275 commit 41feca4

File tree

3 files changed

+18
-28
lines changed

3 files changed

+18
-28
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
195195
layout = this.getChildControl("header");
196196
layout.add(control, this.self().HPOS.TITLE);
197197
break;
198-
case "subtitle-icon": {
198+
case "share-icon": {
199199
control = new qx.ui.basic.Image().set({
200200
allowGrowX: false,
201201
allowShrinkX: false,

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

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,16 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
261261

262262
_applyAccessRights: function(value) {
263263
if (value && Object.keys(value).length) {
264-
const shareIcon = this.getChildControl("subtitle-icon");
265-
if (this.isResourceType("function")) {
266-
// in case of functions, the access rights are actually myAccessRights
267-
osparc.dashboard.CardBase.populateMyAccessRightsIcon(shareIcon, value);
268-
} else {
269-
shareIcon.addListener("tap", e => {
270-
e.stopPropagation();
271-
this.openAccessRights();
272-
}, this);
273-
shareIcon.addListener("pointerdown", e => e.stopPropagation());
274-
osparc.dashboard.CardBase.populateShareIcon(shareIcon, value);
264+
const shareIcon = this.getChildControl("share-icon");
265+
shareIcon.addListener("tap", e => {
266+
e.stopPropagation();
267+
this.openAccessRights();
268+
}, this);
269+
shareIcon.addListener("pointerdown", e => e.stopPropagation());
270+
osparc.dashboard.CardBase.populateShareIcon(shareIcon, value);
275271

276-
if (this.isResourceType("study")) {
277-
this._setStudyPermissions(value);
278-
}
272+
if (this.isResourceType("study")) {
273+
this._setStudyPermissions(value);
279274
}
280275
}
281276
},

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

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -257,20 +257,15 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
257257
_applyAccessRights: function(value) {
258258
if (value && Object.keys(value).length) {
259259
const shareIcon = this.getChildControl("shared-icon");
260-
if (this.isResourceType("function")) {
261-
// in case of functions, the access rights are actually myAccessRights
262-
osparc.dashboard.CardBase.populateMyAccessRightsIcon(shareIcon, value);
263-
} else {
264-
shareIcon.addListener("tap", e => {
265-
e.stopPropagation();
266-
this.openAccessRights();
267-
}, this);
268-
shareIcon.addListener("pointerdown", e => e.stopPropagation());
269-
osparc.dashboard.CardBase.populateShareIcon(shareIcon, value);
260+
shareIcon.addListener("tap", e => {
261+
e.stopPropagation();
262+
this.openAccessRights();
263+
}, this);
264+
shareIcon.addListener("pointerdown", e => e.stopPropagation());
265+
osparc.dashboard.CardBase.populateShareIcon(shareIcon, value);
270266

271-
if (this.isResourceType("study")) {
272-
this._setStudyPermissions(value);
273-
}
267+
if (this.isResourceType("study")) {
268+
this._setStudyPermissions(value);
274269
}
275270
}
276271
},

0 commit comments

Comments
 (0)