Merge branch 'master' into 13992-creating-a-collection-within-a-project-does-not...
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-action-set.ts
index dc17e693e38a8cff841689ff29121f4f9bf3fa71..91fa2b00f6d8e3f7e9ca2d4d3bbd1a7ffd933966 100644 (file)
@@ -4,6 +4,8 @@
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { collectionPanelFilesAction } from "../../../store/collection-panel/collection-panel-files/collection-panel-files-actions";
+import { openMultipleFilesRemoveDialog } from "../../file-remove-dialog/multiple-files-remove-dialog";
+import { createCollectionWithSelected } from "../../create-collection-dialog-with-selected/create-collection-dialog-with-selected";
 
 
 export const collectionFilesActionSet: ContextMenuActionSet = [[{
@@ -11,24 +13,24 @@ export const collectionFilesActionSet: ContextMenuActionSet = [[{
     execute: (dispatch) => {
         dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
     }
-},{
+}, {
     name: "Unselect all",
     execute: (dispatch) => {
         dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
     }
-},{
+}, {
     name: "Remove selected",
     execute: (dispatch, resource) => {
-        return;
+        dispatch(openMultipleFilesRemoveDialog());
     }
-},{
+}, {
     name: "Download selected",
     execute: (dispatch, resource) => {
         return;
     }
-},{
+}, {
     name: "Create a new collection with selected",
-    execute: (dispatch, resource) => {
-        return;
+    execute: (dispatch) => {
+        dispatch<any>(createCollectionWithSelected());
     }
 }]];