@@ -272,7 +272,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
272272 menu . addSeparator ( ) ;
273273
274274 const trashButton = new qx . ui . menu . Button ( this . tr ( "Trash" ) , "@FontAwesome5Solid/trash/12" ) ;
275- trashButton . addListener ( "execute" , ( ) => this . __trashFolderRequested ( ) , this ) ;
275+ trashButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "trashFolderRequested" , this . getFolderId ( ) ) , this ) ;
276276 menu . add ( trashButton ) ;
277277 } else if ( studyBrowserContext === "trash" ) {
278278 const restoreButton = new qx . ui . menu . Button ( this . tr ( "Restore" ) , "@MaterialIcons/restore_from_trash/16" ) ;
@@ -325,24 +325,6 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
325325 folderEditor . addListener ( "cancel" , ( ) => win . close ( ) ) ;
326326 } ,
327327
328- __trashFolderRequested : function ( ) {
329- const trashDays = osparc . store . StaticInfo . getInstance ( ) . getTrashRetentionDays ( ) ;
330- let msg = this . tr ( "Are you sure you want to move the Folder and all its content to the trash?" ) ;
331- msg += "<br><br>" + this . tr ( "It will be permanently deleted after " ) + trashDays + " days." ;
332- const confirmationWin = new osparc . ui . window . Confirmation ( msg ) . set ( {
333- caption : this . tr ( "Move to Trash" ) ,
334- confirmText : this . tr ( "Move to Trash" ) ,
335- confirmAction : "delete"
336- } ) ;
337- confirmationWin . center ( ) ;
338- confirmationWin . open ( ) ;
339- confirmationWin . addListener ( "close" , ( ) => {
340- if ( confirmationWin . getConfirmed ( ) ) {
341- this . fireDataEvent ( "trashFolderRequested" , this . getFolderId ( ) ) ;
342- }
343- } , this ) ;
344- } ,
345-
346328 __deleteFolderRequested : function ( ) {
347329 const msg = this . tr ( "Are you sure you want to delete" ) + " <b>" + this . getTitle ( ) + "</b>?" ;
348330 const confirmationWin = new osparc . ui . window . Confirmation ( msg ) . set ( {
0 commit comments