X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/28cfe1015a00073a89726ef39b9ac04733ea49cc..c0309f65edc9e6ed92e13d4d83afaa8b043c56b0:/src/views-components/context-menu/action-sets/collection-files-action-set.ts diff --git a/src/views-components/context-menu/action-sets/collection-files-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-action-set.ts index 5b683bf81e..03cfdb9bb8 100644 --- a/src/views-components/context-menu/action-sets/collection-files-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-files-action-set.ts @@ -4,30 +4,41 @@ import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set"; import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions"; -import { openCollectionPartialCopyDialog } from '~/store/collections/collection-partial-copy-actions'; -import { DownloadCollectionFileAction } from "~/views-components/context-menu/actions/download-collection-file-action"; +import { openCollectionPartialCopyDialog, openCollectionPartialCopyToSelectedCollectionDialog } from '~/store/collections/collection-partial-copy-actions'; -export const collectionFilesActionSet: ContextMenuActionSet = [[{ - name: "Select all", - execute: dispatch => { - dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES()); +// These action sets are used on the multi-select actions button. +export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[ + { + name: "Select all", + execute: dispatch => { + dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES()); + } + }, + { + name: "Unselect all", + execute: dispatch => { + dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES()); + } + }, + { + name: "Create a new collection with selected", + execute: dispatch => { + dispatch(openCollectionPartialCopyDialog()); + } + }, + { + name: "Copy selected into the collection", + execute: dispatch => { + dispatch(openCollectionPartialCopyToSelectedCollectionDialog()); + } } -}, { - name: "Unselect all", - execute: dispatch => { - dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES()); - } -}, { - name: "Remove selected", - execute: dispatch => { - dispatch(openMultipleFilesRemoveDialog()); - } -}, { - component: DownloadCollectionFileAction, - execute: () => { return; } -}, { - name: "Create a new collection with selected", - execute: dispatch => { - dispatch(openCollectionPartialCopyDialog()); - } -}]]; +]]; + +export const collectionFilesActionSet: ContextMenuActionSet = readOnlyCollectionFilesActionSet.concat([[ + { + name: "Remove selected", + execute: dispatch => { + dispatch(openMultipleFilesRemoveDialog()); + } + }, +]]);