aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authormadelinegr <laura_wilson@brown.edu>2019-02-27 00:38:39 -0500
committermadelinegr <laura_wilson@brown.edu>2019-02-27 00:38:39 -0500
commitf90b7ca17a9f45aa6c47f1d7a37d09af4d44d2ad (patch)
treed649aef96cb7c6621d325f14a0ccf3404172085b /src/client/views/collections
parent04ee2ad6e7ca887c3cfc7277c4b382f936c0fa6d (diff)
kvp almost done
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx6
-rw-r--r--src/client/views/collections/CollectionView.tsx2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index 12909c151..ded1e3785 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -163,6 +163,11 @@ export class CollectionFreeFormView extends CollectionViewBase {
});
}
+ @action
+ addKVP(doc: Document) {
+ let fields = doc.fields;
+ // aefawefwaef
+ }
@computed get backgroundLayout(): string | undefined {
let field = this.props.Document.GetT(KeyStore.BackgroundLayout, TextField);
@@ -241,6 +246,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
{this.backgroundView}
{this.views}
</div>
+ <!-- put fale stuff here>
{this.overlayView}
</div>
);
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 03e1f1fa4..2e48bd57a 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -49,6 +49,7 @@ export class CollectionView extends React.Component<CollectionViewProps> {
}
}
+
@action
removeDocument = (doc: Document): boolean => {
//TODO This won't create the field if it doesn't already exist
@@ -60,6 +61,7 @@ export class CollectionView extends React.Component<CollectionViewProps> {
break;
}
}
+
if (index !== -1) {
value.splice(index, 1)