Skip to content

Commit d8dacc0

Browse files
committed
Make context depend on products
1 parent bd72ef7 commit d8dacc0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,18 @@ qx.Class.define("osparc.dashboard.SearchBarFilterExtended", {
177177

178178
const contextDropDown = this.getChildControl("context-drop-down");
179179
this.getChildControl("my-projects-button");
180-
this.getChildControl("templates-button");
181-
this.getChildControl("public-projects-button");
182-
this.getChildControl("functions-button");
180+
if (osparc.product.Utils.showTemplates()) {
181+
this.getChildControl("templates-button");
182+
}
183+
if (osparc.product.Utils.showPublicProjects()) {
184+
this.getChildControl("public-projects-button");
185+
}
186+
if (osparc.product.Utils.showFunctions()) {
187+
this.getChildControl("functions-button");
188+
}
189+
if (contextDropDown.getChildren().length === 1) {
190+
contextDropDown.hide();
191+
}
183192
contextDropDown.addListener("changeSelection", e => {
184193
const selection = e.getData();
185194
if (selection.length) {

0 commit comments

Comments
 (0)