@@ -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