Skip to content

Commit 59e395d

Browse files
committed
"showTab"
1 parent 30cbae9 commit 59e395d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ qx.Class.define("osparc.dashboard.Dashboard", {
184184
this.setSelection([tabFound]);
185185
}
186186
}, this);
187+
viewLayout.addListener("showTab", e => {
188+
const showTab = e.getData();
189+
tabPage.setVisibility(showTab ? "visible" : "excluded");
190+
})
187191
const scrollerMainView = new qx.ui.container.Scroll();
188192
scrollerMainView.add(viewLayout);
189193
tabPage.add(scrollerMainView);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
8888

8989
events: {
9090
"changeTab": "qx.event.type.Data",
91-
"publishTemplate": "qx.event.type.Data"
91+
"showTab": "qx.event.type.Data",
92+
"publishTemplate": "qx.event.type.Data",
9293
},
9394

9495
statics: {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
105105
} else {
106106
this._resourcesList = templatesList.filter(template => osparc.study.Utils.extractTemplateType(template) === this.__templateType);
107107
}
108+
this.fireDataEvent("showTab", Boolean(this._resourcesList.length));
109+
108110
this._reloadCards();
109111
},
110112

0 commit comments

Comments
 (0)