Skip to content

Commit 6594e04

Browse files
committed
open right button
1 parent 776bfab commit 6594e04

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ qx.Class.define("osparc.dashboard.SearchBarFilterExtended", {
3434

3535
this.__buildLayout();
3636

37+
// defaults to "My Projects"
3738
this.__searchMyProjectsSelected();
3839

39-
this.__currentFilter = null;
40-
4140
qx.core.Init.getApplication().getRoot().add(this);
4241

4342
this.__attachHideHandlers();
@@ -72,8 +71,6 @@ qx.Class.define("osparc.dashboard.SearchBarFilterExtended", {
7271
members: {
7372
__sourceSearchBarFilter: null,
7473
__resourceType: null,
75-
__currentFilter: null,
76-
__filtersMenu: null,
7774

7875
_createChildControlImpl: function(id) {
7976
let control;
@@ -112,7 +109,7 @@ qx.Class.define("osparc.dashboard.SearchBarFilterExtended", {
112109
break;
113110
case "public-projects-button":
114111
control = this.self().createToolbarRadioButton(
115-
this.tr("My Projects"),
112+
this.tr("Public Projects"),
116113
"@FontAwesome5Solid/globe/14",
117114
null,
118115
"right",

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,22 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
10661066
cursor: "pointer",
10671067
});
10681068
textField.addListener("tap", () => {
1069-
searchBarFilter.popUpSearchBarFilter();
1069+
const searchBarFilterExtended = searchBarFilter.popUpSearchBarFilter();
1070+
switch (this.getCurrentContext()) {
1071+
case osparc.dashboard.StudyBrowser.CONTEXT.PROJECTS:
1072+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PROJECTS:
1073+
case osparc.dashboard.StudyBrowser.CONTEXT.TRASH:
1074+
searchBarFilterExtended.getChildControl("my-projects-button").setValue(true);
1075+
break;
1076+
case osparc.dashboard.StudyBrowser.CONTEXT.TEMPLATES:
1077+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_TEMPLATES:
1078+
searchBarFilterExtended.getChildControl("templates-button").setValue(true);
1079+
break;
1080+
case osparc.dashboard.StudyBrowser.CONTEXT.PUBLIC_TEMPLATES:
1081+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PUBLIC_TEMPLATES:
1082+
searchBarFilterExtended.getChildControl("public-projects-button").setValue(true);
1083+
break;
1084+
}
10701085
});
10711086

10721087
const header = this.__header = new osparc.dashboard.StudyBrowserHeader();

0 commit comments

Comments
 (0)