diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-02-13 01:18:03 -0500 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-02-13 01:18:03 -0500 |
| commit | 77b0746c5eeed652d6b2bd71d02783ab8d3c0296 (patch) | |
| tree | 3fd503f63182cc1b57cd29258cf8009fc14fe02f /src/client | |
| parent | 4bcc7ff7bf220766b2046152bf4a7a89260e59c6 (diff) | |
made time controls show only on hover. fixed removing from template collection. fixed errors.
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/views/collections/CollectionTimeView.scss | 7 | ||||
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTimeView.scss b/src/client/views/collections/CollectionTimeView.scss index 2dffb3ea0..6ea5e6908 100644 --- a/src/client/views/collections/CollectionTimeView.scss +++ b/src/client/views/collections/CollectionTimeView.scss @@ -67,6 +67,7 @@ pointer-events: all; padding: 5px; border: 1px solid black; + display:none; } .collectionTimeView-treeView { @@ -131,4 +132,10 @@ .collectionFreeform-customText { text-align: center; } +} + +.collectionTimeView:hover, .collectionTimeView-pivot:hover { + .pivotKeyEntry { + display:unset; + } }
\ No newline at end of file diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index de3e9737f..ad39b69d8 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -145,7 +145,7 @@ export class CollectionView extends Touchable<FieldViewProps> { removeDocument(doc: Doc): boolean { const docView = DocumentManager.Instance.getDocumentView(doc, this.props.ContainingCollectionView); docView && SelectionManager.DeselectDoc(docView); - const targetDataDoc = this.props.Document.resolvedDataDoc ? this.props.Document : this.props.Document[DataSym]; + const targetDataDoc = this.props.Document.resolvedDataDoc && !this.props.Document.isTemplateForField ? this.props.Document : Doc.GetProto(this.props.Document[DataSym]); const value = Cast(targetDataDoc[this.props.fieldKey], listSpec(Doc), []); let index = value.reduce((p, v, i) => (v instanceof Doc && v === doc) ? i : p, -1); index = index !== -1 ? index : value.reduce((p, v, i) => (v instanceof Doc && Doc.AreProtosEqual(v, doc)) ? i : p, -1); |
