From 843ac47f04f8c9bd687600f9f07fe4c15744e4ec Mon Sep 17 00:00:00 2001 From: Abdullah Ahmed Date: Tue, 13 Aug 2019 11:12:41 -0400 Subject: recommendations --- src/client/views/nodes/DocumentView.tsx | 113 +++++++++++++++++--------------- 1 file changed, 59 insertions(+), 54 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index c8eab85c2..24bcc0217 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -40,6 +40,7 @@ import React = require("react"); import { DictationManager } from '../../util/DictationManager'; import { MainView } from '../MainView'; import requestPromise = require('request-promise'); +import { Recommendations } from '../../../Recommendations'; const JsxParser = require('react-jsx-parser').default; //TODO Why does this need to be imported like this? library.add(fa.faTrash); @@ -680,6 +681,7 @@ export class DocumentView extends DocComponent(Docu } render() { + let documents = [{ preview: "hi", similarity: 0 }]; let backgroundColor = this.layoutDoc.isBackground || (this.props.ContainingCollectionView && this.props.ContainingCollectionView.props.Document.clusterOverridesDefaultBackground && this.layoutDoc.backgroundColor === this.layoutDoc.defaultBackgroundColor) ? this.props.backgroundColor(this.layoutDoc) || StrCast(this.layoutDoc.backgroundColor) : StrCast(this.layoutDoc.backgroundColor) || this.props.backgroundColor(this.layoutDoc); @@ -699,61 +701,64 @@ export class DocumentView extends DocComponent(Docu let showTextTitle = showTitle && StrCast(this.layoutDoc.layout).startsWith(" - {!showTitle && !showCaption ? this.contents : -
- -
- {this.contents} -
- {!showTitle ? (null) : -
- StrCast((this.layoutDoc.isTemplate || !this.dataDoc ? this.layoutDoc : this.dataDoc)[showTitle!])} - SetValue={(value: string) => (Doc.GetProto(this.layoutDoc)[showTitle!] = value) ? true : true} - /> -
- } - {!showCaption ? (null) : -
- +
+
+ {!showTitle && !showCaption ? this.contents : +
+ +
+ {this.contents}
- } -
- } + {!showTitle ? (null) : +
+ StrCast((this.layoutDoc.isTemplate || !this.dataDoc ? this.layoutDoc : this.dataDoc)[showTitle!])} + SetValue={(value: string) => (Doc.GetProto(this.layoutDoc)[showTitle!] = value) ? true : true} + /> +
+ } + {!showCaption ? (null) : +
+ +
+ } +
+ } +
+
); } -- cgit v1.2.3-70-g09d2