@@ -92,7 +92,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
9292 check : [ "studiesAndFolders" , "workspaces" , "search" , "trash" ] ,
9393 nullable : false ,
9494 init : "studiesAndFolders" ,
95- event : "changeCurrentContext"
95+ event : "changeCurrentContext" ,
9696 } ,
9797 } ,
9898
@@ -153,8 +153,6 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
153153 folder . bind ( "parentFolderId" , this , "parentFolderId" ) ;
154154 folder . bind ( "name" , this , "title" ) ;
155155 folder . bind ( "lastModified" , this , "lastModified" ) ;
156-
157- this . __addMenuButton ( ) ;
158156 } ,
159157
160158 __applyWorkspaceId : function ( workspaceId ) {
@@ -187,7 +185,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
187185 }
188186 } ,
189187
190- __addMenuButton : function ( ) {
188+ populateMenuButton : function ( ) {
191189 const menuButton = this . getChildControl ( "menu-button" ) ;
192190 menuButton . setVisibility ( "visible" ) ;
193191
@@ -198,6 +196,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
198196 if ( this . getCurrentContext ( ) === "trash" ) {
199197 const trashButton = new qx . ui . menu . Button ( this . tr ( "Restore" ) , "@MaterialIcons/restore_from_trash/16" ) ;
200198 trashButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "untrashFolderRequested" , this . getFolderId ( ) ) , this ) ;
199+ menu . add ( trashButton ) ;
201200
202201 menu . addSeparator ( ) ;
203202
0 commit comments