From 4d864ff2126f3dfc02551cd274817bb891a5e18d Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 31 Mar 2020 11:51:41 -0400 Subject: [PATCH] LP1869906 Angular staff cat browse links Use routerLinks instead of click-handlers for browse results links so users have the option to control-click and open individual results in a new tab. Signed-off-by: Bill Erickson Signed-off-by: Chris Sharp --- .../app/staff/catalog/browse/results.component.html | 6 ++++-- .../src/app/staff/catalog/browse/results.component.ts | 19 +++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.html index fdbb05408c..f30cedaf81 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.html @@ -39,7 +39,8 @@
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.ts index e8b3499c66..3aeaf6b32c 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.ts @@ -117,21 +117,20 @@ export class BrowseResultsComponent implements OnInit, OnDestroy { } } - searchByBrowseEntry(result) { - - // Avoid propagating browse values to term search. - this.searchContext.browseSearch.reset(); - - this.searchContext.termSearch.hasBrowseEntry = + searchByBrowseEntryParams(result) { + const ctx = this.searchContext.clone(); + ctx.browseSearch.reset(); // we're done browsing + ctx.termSearch.hasBrowseEntry = result.browse_entry + ',' + result.fields; - this.staffCat.search(); + return this.catUrl.toUrlParams(ctx); } // NOTE: to test unauthorized heading display in concerto // browse for author = kab - newBrowseFromHeading(heading) { - this.searchContext.browseSearch.value = heading.heading; - this.staffCat.browse(); + newBrowseFromHeadingParams(heading) { + const ctx = this.searchContext.clone(); + ctx.browseSearch.value = heading.heading; + return this.catUrl.toUrlParams(ctx); } } -- 2.11.0