Skip to content

Commit a9ac42e

Browse files
committed
minor
1 parent cd0873f commit a9ac42e

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
2828
this.set({
2929
backgroundColor: "input_background",
3030
paddingLeft: 6,
31+
height: this.self().HEIGHT,
3132
maxHeight: this.self().HEIGHT,
3233
decorator: "rounded",
3334
});
@@ -124,7 +125,6 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
124125
break;
125126
case "reset-button":
126127
control = new qx.ui.toolbar.Button(null, "@MaterialIcons/close/20").set({
127-
cursor: "pointer",
128128
paddingLeft: 0,
129129
paddingRight: 10,
130130
alignY: "middle",

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
3333

3434
this.__buildLayout();
3535

36+
this.__searchMyProjectsSelected();
37+
3638
this.__currentFilter = null;
3739

3840
qx.core.Init.getApplication().getRoot().add(this);
@@ -107,7 +109,7 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
107109
);
108110
this.getChildControl("context-buttons").add(control);
109111
break;
110-
case "search-bar":
112+
case "search-bar-filter":
111113
control = new osparc.dashboard.SearchBarFilter(this.__resourceType);
112114
this._add(control);
113115
break;
@@ -120,12 +122,26 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
120122
const myProjectsButton = this.getChildControl("my-projects-button");
121123
const templatesButton = this.getChildControl("templates-button");
122124
const publicProjectsButton = this.getChildControl("public-projects-button");
123-
const searchBar = this.getChildControl("search-bar");
124-
searchBar.set({
125+
this.getChildControl("search-bar-filter").set({
125126
showFilterMenu: false,
126127
});
127128

128129
radioGroup.add(myProjectsButton, templatesButton, publicProjectsButton);
130+
myProjectsButton.addListener("changeValue", this.__searchMyProjectsSelected, this);
131+
templatesButton.addListener("changeValue", this.__searchTemplatesSelected, this);
132+
publicProjectsButton.addListener("changeValue", this.__searchPublicProjectsSelected, this);
133+
},
134+
135+
__searchMyProjectsSelected: function() {
136+
this.getChildControl("search-bar-filter").getChildControl("text-field").setPlaceholder(this.tr("Search My projects"));
137+
},
138+
139+
__searchTemplatesSelected: function() {
140+
this.getChildControl("search-bar-filter").getChildControl("text-field").setPlaceholder(this.tr("Search Templates"));
141+
},
142+
143+
__searchPublicProjectsSelected: function() {
144+
this.getChildControl("search-bar-filter").getChildControl("text-field").setPlaceholder(this.tr("Search Public projects"));
129145
},
130146

131147
__attachHideHandlers: function() {

0 commit comments

Comments
 (0)