From e0b84cf329d7a9c9bda1aadbf25894c4bcc8f13a Mon Sep 17 00:00:00 2001 From: ab Date: Mon, 16 Sep 2019 17:15:37 -0400 Subject: demo touches --- src/client/views/nodes/DocumentView.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/DocumentView.tsx') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index a034bc1f4..a80eafde2 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -777,9 +777,16 @@ export class DocumentView extends DocComponent(Docu const extdoc = doc.data_ext as Doc; const values = await ClientRecommender.Instance.extractText(doc, extdoc ? extdoc : doc, false); const headers = [new SchemaHeaderField("title"), new SchemaHeaderField("href")]; - const body = Docs.Create.FreeformDocument([], { title: values.title }); - body.href = values.url; - CollectionDockingView.Instance.AddRightSplit(Docs.Create.SchemaDocument(headers, [body], { title: `Showing External Recommendations for "${StrCast(doc.title)}"` }), undefined); + let bodies: Doc[] = []; + const titles = values.title_vals; + const urls = values.url_vals; + for (let i = 0; i < 5; i++) { + const body = Docs.Create.FreeformDocument([], { title: titles[i] }); + body.href = urls[i]; + bodies.push(body); + } + + CollectionDockingView.Instance.AddRightSplit(Docs.Create.SchemaDocument(headers, bodies, { title: `Showing External Recommendations for "${StrCast(doc.title)}"` }), undefined); } onPointerEnter = (e: React.PointerEvent): void => { Doc.BrushDoc(this.props.Document); }; -- cgit v1.2.3-70-g09d2