diff options
| author | Eleanor Eng <eleanoreng@eleanors-mbp.devices.brown.edu> | 2019-02-25 18:24:46 -0500 |
|---|---|---|
| committer | Eleanor Eng <eleanoreng@eleanors-mbp.devices.brown.edu> | 2019-02-25 18:24:46 -0500 |
| commit | 8772cc68e850653af72dbd9aced73d529900173b (patch) | |
| tree | 369fc690c0994b21e7204ce3bd6bba80a2dc36a8 /src/client/views/collections/CollectionViewBase.tsx | |
| parent | e5a14d6dddccc922bb253323b461ac2500c33b7c (diff) | |
No wrapping
Diffstat (limited to 'src/client/views/collections/CollectionViewBase.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionViewBase.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionViewBase.tsx b/src/client/views/collections/CollectionViewBase.tsx index eea7908ce..7ee010ec6 100644 --- a/src/client/views/collections/CollectionViewBase.tsx +++ b/src/client/views/collections/CollectionViewBase.tsx @@ -27,8 +27,17 @@ export const COLLECTION_BORDER_WIDTH = 2; export class CollectionViewBase extends React.Component<CollectionViewProps> { public static LayoutString(collectionType: string) { - return `<${collectionType} DocumentForCollection={Document} CollectionFieldKey={DataKey} ContainingDocumentView={DocumentView}/>`; + return `<${collectionType} onContextMenu={this.specificContextMenu} DocumentForCollection={Document} CollectionFieldKey={DataKey} ContainingDocumentView={DocumentView}/>`; } + + //REPLACE THIS WITH CAPABILITIES SPECIFIC TO THIS TYPE OF NODE + collectionCapability = (e: React.MouseEvent): void => { + } + + specificContextMenu = (e: React.MouseEvent): void => { + ContextMenu.Instance.addItem({ description: "Collection Capability", event: this.collectionCapability }); + } + @computed public get active(): boolean { var isSelected = (this.props.ContainingDocumentView instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.ContainingDocumentView)); |
