From 4d1fbc9b7e3dcccf5334d08739b25025e517ce13 Mon Sep 17 00:00:00 2001 From: bob Date: Thu, 12 Dec 2019 16:15:03 -0500 Subject: working on search result layout --- src/client/views/search/SearchBox.tsx | 9 ++++----- src/client/views/search/SearchItem.tsx | 23 +++++++++-------------- 2 files changed, 13 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 515c248f7..b80c3bb54 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -339,7 +339,7 @@ export class SearchBox extends React.Component { render() { return ( -
+
{ e.stopPropagation(); e.preventDefault(); }}>
@@ -349,10 +349,9 @@ export class SearchBox extends React.Component { style={{ width: this._searchbarOpen ? "500px" : "100px" }} />
- {(this._numTotalResults > 0 || !this._searchbarOpen) ? (null) : - (
-
-
)} +
+
+
{ if (!this._useIcons) { const returnXDimension = () => this._useIcons ? 50 : Number(SEARCH_THUMBNAIL_SIZE); const returnYDimension = () => this._displayDim; - const scale = () => returnXDimension() / NumCast(Doc.Layout(this.props.doc).nativeWidth, returnXDimension()); const docview =
{ this._useIcons = !this._useIcons; this._displayDim = this._useIcons ? 50 : Number(SEARCH_THUMBNAIL_SIZE); })} - onPointerEnter={action(() => this._displayDim = this._useIcons ? 50 : Number(SEARCH_THUMBNAIL_SIZE))} - onPointerLeave={action(() => this._displayDim = 50)} > - this._displayDim = this._useIcons ? 50 : Number(SEARCH_THUMBNAIL_SIZE))} > +
; return docview; @@ -287,7 +282,7 @@ export class SearchItem extends React.Component {
{this.props.highlighting.length ? "Matched fields:" + this.props.highlighting.join(", ") : this.props.lines.length ? this.props.lines[0] : ""}
{this.props.lines.filter((m, i) => i).map((l, i) =>
`${l}`
)}
-
+
{this.DocumentIcon()}
{this.props.doc.type ? this.props.doc.type : "Other"}
-- cgit v1.2.3-70-g09d2 From 15fd03eb0b3d408ba616e23419ec7f2d6ae17f50 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 12 Dec 2019 17:38:35 -0500 Subject: from previous --- src/client/util/DocumentManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 6f65e6c68..1cb8b55d3 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -108,7 +108,7 @@ export class DocumentManager { return init && rest; }) ).reduce((pairs, dv) => { - const linksList = DocListCast(dv.props.Document.links); + const linksList = LinkManager.Instance.getAllRelatedLinks(dv.props.Document); pairs.push(...linksList.reduce((pairs, link) => { const linkToDoc = link && LinkManager.Instance.getOppositeAnchor(link, dv.props.Document); linkToDoc && DocumentManager.Instance.getDocumentViews(linkToDoc).map(docView1 => { -- cgit v1.2.3-70-g09d2