@@ -54,19 +54,29 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
5454 __buildLayout : function ( ) {
5555 const filtersSpacer = new qx . ui . core . Spacer ( 10 , 10 ) ;
5656 switch ( this . __resourceType ) {
57- case "study" :
57+ case "study" : {
5858 this . _add ( this . __createWorkspacesAndFoldersTree ( ) ) ;
5959 this . _add ( this . __createTrashBin ( ) ) ;
6060 this . _add ( this . __createResourceTypeContextButtons ( ) ) ;
6161 this . _add ( filtersSpacer ) ;
62- this . _add ( this . __createTagsFilterLayout ( ) ) ;
62+ const scrollView = new qx . ui . container . Scroll ( ) ;
63+ scrollView . add ( this . __createTagsFilterLayout ( ) ) ;
64+ this . _add ( scrollView , {
65+ flex : 1
66+ } ) ;
6367 break ;
64- case "template" :
68+ }
69+ case "template" : {
6570 this . _add ( this . __createResourceTypeContextButtons ( ) ) ;
6671 this . _add ( filtersSpacer ) ;
6772 this . _add ( this . __createSharedWithFilterLayout ( ) ) ;
68- this . _add ( this . __createTagsFilterLayout ( ) ) ;
73+ const scrollView = new qx . ui . container . Scroll ( ) ;
74+ scrollView . add ( this . __createTagsFilterLayout ( ) ) ;
75+ this . _add ( scrollView , {
76+ flex : 1
77+ } ) ;
6978 break ;
79+ }
7080 case "service" :
7181 this . _add ( this . __createResourceTypeContextButtons ( ) ) ;
7282 this . _add ( filtersSpacer ) ;
@@ -350,26 +360,26 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
350360
351361 /* TAGS */
352362 __createTagsFilterLayout : function ( ) {
353- const layout = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
354- osparc . utils . Utils . setIdToWidget ( layout , this . __resourceType + "-tagsFilter" ) ;
363+ const tagsLayout = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
364+ osparc . utils . Utils . setIdToWidget ( tagsLayout , this . __resourceType + "-tagsFilter" ) ;
355365
356- this . __populateTags ( layout , [ ] ) ;
366+ this . __populateTags ( tagsLayout , [ ] ) ;
357367 osparc . store . Tags . getInstance ( ) . addListener ( "tagsChanged" , ( ) => {
358- this . __populateTags ( layout , this . __getSelectedTagIds ( ) ) ;
368+ this . __populateTags ( tagsLayout , this . __getSelectedTagIds ( ) ) ;
359369 } , this ) ;
360370
361- return layout ;
371+ return tagsLayout ;
362372 } ,
363373
364374 __getSelectedTagIds : function ( ) {
365375 const selectedTagIds = this . __tagButtons . filter ( btn => btn . getValue ( ) ) . map ( btn => btn . id ) ;
366376 return selectedTagIds ;
367377 } ,
368378
369- __populateTags : function ( layout , selectedTagIds ) {
379+ __populateTags : function ( tagsLayout , selectedTagIds ) {
370380 const maxTags = 5 ;
371381 this . __tagButtons = [ ] ;
372- layout . removeAll ( ) ;
382+ tagsLayout . removeAll ( ) ;
373383 osparc . store . Tags . getInstance ( ) . getTags ( ) . forEach ( ( tag , idx ) => {
374384 const button = new qx . ui . form . ToggleButton ( null , "@FontAwesome5Solid/tag/16" ) ;
375385 button . id = tag . getTagId ( ) ;
@@ -381,7 +391,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
381391 value : selectedTagIds . includes ( tag . getTagId ( ) )
382392 } ) ;
383393
384- layout . add ( button ) ;
394+ tagsLayout . add ( button ) ;
385395
386396 button . addListener ( "execute" , ( ) => {
387397 const selection = this . __getSelectedTagIds ( ) ;
@@ -411,7 +421,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
411421 showAllButton . showingAll = true ;
412422 }
413423 } ) ;
414- layout . add ( showAllButton ) ;
424+ tagsLayout . add ( showAllButton ) ;
415425 }
416426
417427 const editTagsButton = new qx . ui . form . Button ( this . tr ( "Edit Tags..." ) , "@FontAwesome5Solid/pencil-alt/14" ) ;
@@ -422,10 +432,10 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
422432 const preferencesWindow = osparc . desktop . preferences . PreferencesWindow . openWindow ( ) ;
423433 preferencesWindow . openTags ( ) ;
424434 } ) ;
425- layout . add ( editTagsButton ) ;
435+ tagsLayout . add ( editTagsButton ) ;
426436
427437 if ( this . __resourceType === "study" ) {
428- layout . getChildren ( ) . forEach ( item => item . setPaddingLeft ( 10 ) ) ; // align them with the context
438+ tagsLayout . getChildren ( ) . forEach ( item => item . setPaddingLeft ( 10 ) ) ; // align them with the context
429439 }
430440 } ,
431441 /* /TAGS */
0 commit comments