Skip to content

Commit 9433d73

Browse files
committed
"icons-layout"
1 parent d614cae commit 9433d73

File tree

2 files changed

+33
-42
lines changed

2 files changed

+33
-42
lines changed

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

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,13 @@ qx.Class.define("osparc.dashboard.ListButtonBase", {
5050
SPACER: 3,
5151
PROGRESS: 4,
5252
TAGS: 5,
53-
UPDATES: 6,
54-
UI_MODE: 7,
55-
STATUS: 8,
56-
PERMISSION: 9,
57-
TSR: 10,
58-
OWNER: 11,
59-
SHARED: 12,
60-
LAST_CHANGE: 13,
61-
HITS: 14,
62-
OPTIONS: 15
53+
ICONS_LAYOUT: 6,
54+
TSR: 7,
55+
OWNER: 8,
56+
SHARED: 9,
57+
LAST_CHANGE: 10,
58+
HITS: 11,
59+
OPTIONS: 12
6360
}
6461
},
6562

@@ -114,17 +111,23 @@ qx.Class.define("osparc.dashboard.ListButtonBase", {
114111
column: osparc.dashboard.ListButtonBase.POS.OWNER
115112
});
116113
break;
114+
case "icons-layout":
115+
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(10).set({
116+
alignY: "middle"
117+
}))
118+
this._add(control, {
119+
row: 0,
120+
column: osparc.dashboard.ListButtonBase.POS.ICONS_LAYOUT
121+
});
122+
break;
117123
case "project-status":
118124
control = new qx.ui.basic.Image().set({
119125
alignY: "middle",
120126
textColor: "status_icon",
121127
height: 12,
122128
width: 12
123129
});
124-
this._add(control, {
125-
row: 0,
126-
column: osparc.dashboard.ListButtonBase.POS.STATUS
127-
});
130+
this.getChildControl("icons-layout").add(control);
128131
break;
129132
}
130133
return control || this.base(arguments, id);

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

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
4949
column: osparc.dashboard.ListButtonBase.POS.LOCK_STATUS
5050
});
5151
break;
52-
case "permission-icon":
53-
control = new qx.ui.basic.Image(osparc.dashboard.CardBase.PERM_READ).set({
54-
alignY: "middle",
55-
});
56-
this._add(control, {
57-
row: 0,
58-
column: osparc.dashboard.ListButtonBase.POS.PERMISSION
59-
});
60-
break;
6152
case "tags":
6253
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(3).set({
6354
alignY: "middle"
@@ -100,35 +91,25 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
10091
column: osparc.dashboard.ListButtonBase.POS.TSR
10192
});
10293
break;
94+
case "permission-icon":
95+
control = new qx.ui.basic.Image(osparc.dashboard.CardBase.PERM_READ).set({
96+
alignY: "middle",
97+
});
98+
this.getChildControl("icons-layout").add(control);
99+
break;
103100
case "workbench-mode":
104101
control = new qx.ui.basic.Image().set({
105102
alignY: "middle"
106103
});
107-
this._add(control, {
108-
row: 0,
109-
column: osparc.dashboard.ListButtonBase.POS.UI_MODE
110-
});
104+
this.getChildControl("icons-layout").add(control);
111105
break;
112106
case "empty-workbench":
113107
control = this._getEmptyWorkbenchIcon();
114108
control.set({
115109
alignY: "middle",
116110
alignX: "center"
117111
});
118-
this._add(control, {
119-
row: 0,
120-
column: osparc.dashboard.ListButtonBase.POS.UPDATES
121-
});
122-
break;
123-
case "hits-service":
124-
control = new qx.ui.basic.Label().set({
125-
alignY: "middle",
126-
toolTipText: this.tr("Number of times you instantiated it")
127-
});
128-
this._add(control, {
129-
row: 0,
130-
column: osparc.dashboard.ListButtonBase.POS.HITS
131-
});
112+
this.getChildControl("icons-layout").add(control);
132113
break;
133114
case "update-study":
134115
control = new qx.ui.basic.Image().set({
@@ -137,9 +118,16 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
137118
visibility: "excluded"
138119
});
139120
osparc.utils.Utils.setIdToWidget(control, "updateStudyBtn");
121+
this.getChildControl("icons-layout").add(control);
122+
break;
123+
case "hits-service":
124+
control = new qx.ui.basic.Label().set({
125+
alignY: "middle",
126+
toolTipText: this.tr("Number of times you instantiated it")
127+
});
140128
this._add(control, {
141129
row: 0,
142-
column: osparc.dashboard.ListButtonBase.POS.UPDATES
130+
column: osparc.dashboard.ListButtonBase.POS.HITS
143131
});
144132
break;
145133
case "menu-selection-stack":

0 commit comments

Comments
 (0)