Skip to content

Commit 3f90936

Browse files
committed
renaming
1 parent 7ce30af commit 3f90936

File tree

7 files changed

+30
-28
lines changed

7 files changed

+30
-28
lines changed

services/static-webserver/client/source/class/osparc/desktop/organizations/OrganizationDetails.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ qx.Class.define("osparc.desktop.organizations.OrganizationDetails", {
5353
orgModel.bind("thumbnail", organizationListItem, "thumbnail");
5454
orgModel.bind("label", organizationListItem, "title");
5555
orgModel.bind("description", organizationListItem, "subtitle");
56-
orgModel.bind("nMembers", organizationListItem, "contact");
56+
orgModel.bind("nMembers", organizationListItem, "role");
5757
orgModel.bind("accessRights", organizationListItem, "accessRights");
5858

5959
// set orgModel to the tab views

services/static-webserver/client/source/class/osparc/desktop/organizations/OrganizationsList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ qx.Class.define("osparc.desktop.organizations.OrganizationsList", {
139139
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
140140
ctrl.bindProperty("label", "title", null, item, id);
141141
ctrl.bindProperty("description", "subtitle", null, item, id);
142-
ctrl.bindProperty("nMembers", "contact", null, item, id);
142+
ctrl.bindProperty("nMembers", "role", null, item, id);
143143
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
144144
},
145145
configureItem: item => {

services/static-webserver/client/source/class/osparc/desktop/wallets/MemberListItem.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ qx.Class.define("osparc.desktop.wallets.MemberListItem", {
4646
},
4747

4848
// overridden
49-
_setSubtitle: function() {
49+
_setRole: function() {
5050
const accessRights = this.getAccessRights();
51-
const subtitle = this.getChildControl("contact");
51+
const role = this.getChildControl("role");
5252
if ("getWrite" in accessRights && accessRights.getWrite()) {
53-
subtitle.setValue(osparc.data.Roles.WALLET[2].label);
53+
role.setValue(osparc.data.Roles.WALLET[2].label);
5454
} else if ("getRead" in accessRights && accessRights.getRead()) {
55-
subtitle.setValue(osparc.data.Roles.WALLET[1].label);
55+
role.setValue(osparc.data.Roles.WALLET[1].label);
5656
}
5757
},
5858

services/static-webserver/client/source/class/osparc/desktop/wallets/WalletListItem.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,16 @@ qx.Class.define("osparc.desktop.wallets.WalletListItem", {
272272
},
273273

274274
// overridden
275-
_setSubtitle: function() {
275+
_setRole: function() {
276276
const accessRightss = this.getAccessRights();
277277
const myGid = osparc.auth.Data.getInstance().getGroupId();
278278
const found = accessRightss && accessRightss.find(ar => ar["gid"] === myGid);
279279
if (found) {
280-
const subtitle = this.getChildControl("contact");
280+
const role = this.getChildControl("role");
281281
if (found["write"]) {
282-
subtitle.setValue(osparc.data.Roles.WALLET[2].label);
282+
role.setValue(osparc.data.Roles.WALLET[2].label);
283283
} else if (found["read"]) {
284-
subtitle.setValue(osparc.data.Roles.WALLET[1].label);
284+
role.setValue(osparc.data.Roles.WALLET[1].label);
285285
}
286286
}
287287
},

services/static-webserver/client/source/class/osparc/ui/list/CollaboratorListItem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,22 +149,22 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
149149
return;
150150
}
151151

152-
this.__setSubtitle();
152+
this.__setRole();
153153

154154
const menu = this.__getOptionsMenu();
155155
const optionsMenu = this.getChildControl("options");
156156
optionsMenu.setMenu(menu);
157157
},
158158

159-
__setSubtitle: function() {
159+
__setRole: function() {
160160
const accessRights = this.getAccessRights();
161-
const subtitle = this.getChildControl("contact");
161+
const role = this.getChildControl("role");
162162
if (this.self().canDelete(accessRights)) {
163-
subtitle.setValue(this._getResource(3).label);
163+
role.setValue(this._getResource(3).label);
164164
} else if (this.self().canWrite(accessRights)) {
165-
subtitle.setValue(this._getResource(2).label);
165+
role.setValue(this._getResource(2).label);
166166
} else {
167-
subtitle.setValue(this._getResource(1).label);
167+
role.setValue(this._getResource(1).label);
168168
}
169169
},
170170

services/static-webserver/client/source/class/osparc/ui/list/ListItem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* c.bindProperty("thumbnail", "thumbnail", null, item, id);
3535
* c.bindProperty("name", "title", null, item, id);
3636
* c.bindProperty("description", "subtitle", null, item, id);
37-
* c.bindProperty("contact", "contact", null, item, id);
37+
* c.bindProperty("role", "role", null, item, id);
3838
* }
3939
* });
4040
* </pre>
@@ -98,9 +98,9 @@ qx.Class.define("osparc.ui.list.ListItem", {
9898
nullable : true
9999
},
100100

101-
contact: {
101+
role: {
102102
check : "String",
103-
apply : "__applyContact",
103+
apply : "__applyRole",
104104
nullable : true
105105
}
106106
},
@@ -180,7 +180,7 @@ qx.Class.define("osparc.ui.list.ListItem", {
180180
column: 1
181181
});
182182
break;
183-
case "contact":
183+
case "role":
184184
control = new qx.ui.basic.Label().set({
185185
font: "text-13",
186186
alignY: "middle"
@@ -244,11 +244,11 @@ qx.Class.define("osparc.ui.list.ListItem", {
244244
label.setValue(value);
245245
},
246246

247-
__applyContact: function(value) {
247+
__applyRole: function(value) {
248248
if (value === null) {
249249
return;
250250
}
251-
const label = this.getChildControl("contact");
251+
const label = this.getChildControl("role");
252252
label.setValue(value);
253253
},
254254

services/static-webserver/client/source/class/osparc/ui/list/ListItemWithMenu.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,29 @@ qx.Class.define("osparc.ui.list.ListItemWithMenu", {
8080
return;
8181
}
8282

83+
this._setRole();
84+
8385
this._getInfoButton();
8486

8587
this.__applyOptions();
8688
},
8789

88-
_setSubtitle: function() {
90+
_setRole: function() {
8991
const accessRights = this.getAccessRights();
90-
const subtitle = this.getChildControl("contact");
92+
const role = this.getChildControl("role");
9193
if (
9294
"getDelete" in accessRights && accessRights.getDelete()
9395
) {
94-
subtitle.setValue(osparc.data.Roles.ORG[3].label);
96+
role.setValue(osparc.data.Roles.ORG[3].label);
9597
} else if ("getWrite" in accessRights && accessRights.getWrite()) {
96-
subtitle.setValue(osparc.data.Roles.ORG[2].label);
98+
role.setValue(osparc.data.Roles.ORG[2].label);
9799
} else if (
98100
("getRead" in accessRights && accessRights.getRead()) ||
99101
("getExecute" in accessRights && accessRights.getExecute())
100102
) {
101-
subtitle.setValue(osparc.data.Roles.ORG[1].label);
103+
role.setValue(osparc.data.Roles.ORG[1].label);
102104
} else {
103-
subtitle.setValue(osparc.data.Roles.ORG[0].label);
105+
role.setValue(osparc.data.Roles.ORG[0].label);
104106
}
105107
},
106108

0 commit comments

Comments
 (0)