Skip to content

Commit 61456fa

Browse files
committed
bring back tab buttons
1 parent 829b5f1 commit 61456fa

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ qx.Class.define("osparc.dashboard.Dashboard", {
3838
construct: function() {
3939
this.base(arguments);
4040

41-
this.getChildControl("bar").set({
42-
visibility: "excluded",
43-
});
41+
osparc.utils.Utils.setIdToWidget(this.getChildControl("bar"), "dashboardTabs");
42+
osparc.utils.Utils.setIdToWidget(this, "dashboard");
4443

4544
this.set({
4645
contentPadding: this.self().PADDING,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
5757
case "study": {
5858
this._add(this.__createWorkspacesAndFoldersTree());
5959
this._add(this.__createTrashBin());
60-
this._add(this.__createResourceTypeContextButtons());
60+
// this._add(this.__createResourceTypeContextButtons());
6161
this._add(filtersSpacer);
6262
const scrollView = new qx.ui.container.Scroll();
6363
scrollView.add(this.__createTagsFilterLayout());
@@ -67,7 +67,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
6767
break;
6868
}
6969
case "template": {
70-
this._add(this.__createResourceTypeContextButtons());
70+
// this._add(this.__createResourceTypeContextButtons());
7171
this._add(filtersSpacer);
7272
this._add(this.__createSharedWithFilterLayout());
7373
const scrollView = new qx.ui.container.Scroll();
@@ -78,7 +78,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
7878
break;
7979
}
8080
case "service":
81-
this._add(this.__createResourceTypeContextButtons());
81+
// this._add(this.__createResourceTypeContextButtons());
8282
this._add(filtersSpacer);
8383
this._add(this.__createSharedWithFilterLayout());
8484
this._add(this.__createServiceTypeFilterLayout());

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ qx.Class.define("osparc.desktop.MainPage", {
199199

200200
__createDashboardLayout: function() {
201201
const dashboard = this.__dashboard = new osparc.dashboard.Dashboard();
202+
const tabsBar = dashboard.getChildControl("bar");
203+
tabsBar.set({
204+
paddingBottom: 6
205+
});
206+
this.__navBar.addDashboardTabButtons(tabsBar);
202207
const dashboardLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
203208
dashboardLayout.add(dashboard, {
204209
flex: 1

services/static-webserver/client/source/class/osparc/navigation/NavigationBar.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,15 @@ qx.Class.define("osparc.navigation.NavigationBar", {
324324
return registerButton;
325325
},
326326

327+
addDashboardTabButtons: function(tabButtons) {
328+
this.__tabButtons = tabButtons;
329+
this.getChildControl("center-items").add(tabButtons);
330+
this.bind("study", this.__tabButtons, "visibility", {
331+
converter: s => s ? "excluded" : "visible"
332+
});
333+
this.__navBarResized();
334+
},
335+
327336
__applyStudy: function(study) {
328337
const readOnlyInfo = this.getChildControl("read-only-info")
329338
if (study) {

0 commit comments

Comments
 (0)