From 8772cc68e850653af72dbd9aced73d529900173b Mon Sep 17 00:00:00 2001 From: Eleanor Eng Date: Mon, 25 Feb 2019 18:24:46 -0500 Subject: No wrapping --- src/client/views/ContextMenu.scss | 21 +++++++++++++++------ .../views/collections/CollectionSchemaView.tsx | 11 ++++++++++- src/client/views/collections/CollectionViewBase.tsx | 11 ++++++++++- src/client/views/nodes/FormattedTextBox.tsx | 11 +++-------- src/client/views/nodes/ImageBox.tsx | 2 +- 5 files changed, 39 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/client/views/ContextMenu.scss b/src/client/views/ContextMenu.scss index 2ac5d3b52..c810aef3e 100644 --- a/src/client/views/ContextMenu.scss +++ b/src/client/views/ContextMenu.scss @@ -4,14 +4,15 @@ z-index: 1000; box-shadow: #AAAAAA .2vw .2vw .4vw; flex-direction: column; //E + // border-radius: 20px; } .contextMenu-item { - width: 10vw; - height: 4vh; - background: #DDDDDD; + width: auto; //10vw + height: auto; //4vh + background: #F0F8FF; // background: #DDDDDD; display: flex; - justify-content: center; + justify-content: left; //center align-items: center; -webkit-touch-callout: none; -webkit-user-select: none; @@ -20,11 +21,17 @@ -ms-user-select: none; user-select: none; transition: all .1s; + border-width: .11px; + border-color: rgb(187, 186, 186); + border-bottom-style: solid; + border-top-style: none; + padding: 10px; + white-space: nowrap; } .contextMenu-item:hover { transition: all .1s; - background: #AAAAAA + background: #B0E0E6; // background: #AAAAAA } .contextMenu-description { @@ -34,5 +41,7 @@ } #mySearch { - font-size: 1.4vw; + font-size: 1.5vw; + border-left-style: none; + border-right-style: none; } \ No newline at end of file diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 331c4f6fe..d924cb163 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -15,6 +15,7 @@ import { KeyStore as KS, Key } from "../../../fields/Key"; import { Document } from "../../../fields/Document"; import { Field } from "../../../fields/Field"; import { Transform } from "../../util/Transform"; +import { ContextMenu } from "../ContextMenu"; @observer export class CollectionSchemaView extends CollectionViewBase { @@ -98,6 +99,14 @@ export class CollectionSchemaView extends CollectionViewBase { } } + //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 }); + } + render() { const { DocumentForCollection: Document, CollectionFieldKey: fieldKey } = this.props; const children = Document.GetList(fieldKey, []); @@ -116,7 +125,7 @@ export class CollectionSchemaView extends CollectionViewBase { content =
} return ( -
+
{ 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)); diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index 0fe6befda..23eca4e24 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -116,7 +116,7 @@ export class FormattedTextBox extends React.Component { } } - //REPLACE THIS WITH CAPABILITIES SPECIFC TO THIS TYPE OF NODE + //REPLACE THIS WITH CAPABILITIES SPECIFIC TO THIS TYPE OF NODE textCapability = (e: React.MouseEvent): void => { } @@ -125,12 +125,7 @@ export class FormattedTextBox extends React.Component { } render() { - return (
) + return (
) } } \ No newline at end of file diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index f363487c3..0f10ef0ef 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -82,7 +82,7 @@ export class ImageBox extends React.Component { } } - //REPLACE THIS WITH CAPABILITIES SPECIFC TO THIS TYPE OF NODE + //REPLACE THIS WITH CAPABILITIES SPECIFIC TO THIS TYPE OF NODE imageCapability = (e: React.MouseEvent): void => { } -- cgit v1.2.3-70-g09d2