@@ -658,6 +658,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
658658 }
659659
660660 if ( params . url . text ) {
661+ delete params . url . orderBy ;
661662 return osparc . data . Resources . fetch ( "studies" , "getPageSearch" , params , undefined , options ) ;
662663 } else if ( params . url . orderBy ) {
663664 return osparc . data . Resources . fetch ( "studies" , "getPageSortBy" , params , undefined , options ) ;
@@ -672,8 +673,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
672673 } ,
673674
674675 __addNewStudyButtons : function ( ) {
675- if ( this . getCurrentWorkspaceId ( ) ) {
676- const currentWorkspace = osparc . store . Workspaces . getInstance ( ) . getWorkspace ( this . getCurrentWorkspaceId ( ) ) ;
676+ const currentWorkspaceId = this . getCurrentWorkspaceId ( ) ;
677+ if ( currentWorkspaceId ) {
678+ if ( currentWorkspaceId === - 2 ) {
679+ return ;
680+ }
681+ const currentWorkspace = osparc . store . Workspaces . getInstance ( ) . getWorkspace ( currentWorkspaceId ) ;
677682 if ( currentWorkspace && ! currentWorkspace . getMyAccessRights ( ) [ "write" ] ) {
678683 // If user can't write in workspace, do not show plus buttons
679684 return ;
@@ -790,15 +795,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
790795 // LAYOUT //
791796 _createLayout : function ( ) {
792797 this . _createSearchBar ( ) ;
793- this . _searchBarFilter . addListener ( "filterChanged" , e => {
794- const filterData = e . getData ( ) ;
795- if ( filterData . text ) {
796- this . _changeContext ( - 2 , null ) ;
797- } else {
798- this . __reloadFolders ( ) ;
799- this . __reloadStudies ( ) ;
800- }
801- } ) ;
802798
803799 if ( osparc . utils . DisabledPlugins . isFoldersEnabled ( ) ) {
804800 const workspaceHeader = new osparc . dashboard . WorkspaceHeader ( ) ;
@@ -1023,6 +1019,9 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
10231019 } ) )
10241020 } ) ;
10251021 this . bind ( "multiSelection" , selectButton , "value" ) ;
1022+ this . bind ( "currentWorkspaceId" , selectButton , "visibility" , {
1023+ converter : currentWorkspaceId => [ - 2 , - 1 ] . includes ( currentWorkspaceId ) ? "excluded" : "visible"
1024+ } ) ;
10261025 return selectButton ;
10271026 } ,
10281027
0 commit comments