[open-ils-commits] [GIT] Evergreen ILS branch master updated. 4d864ff2126f3dfc02551cd274817bb891a5e18d

Evergreen Git git at git.evergreen-ils.org
Fri May 1 09:31:03 EDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  4d864ff2126f3dfc02551cd274817bb891a5e18d (commit)
      from  df6a32fc4b17b8e4cb4645a4efeefe69a93c9c09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4d864ff2126f3dfc02551cd274817bb891a5e18d
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Mar 31 11:51:41 2020 -0400

    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 <berickxx at gmail.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

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 @@
       <div class="col-lg-8">
         <div class="card-body">
           <ng-container *ngIf="result.sources > 0">
-            <a (click)="searchByBrowseEntry(result)" href="javascript:void(0)">
+            <a routerLink="/staff/catalog/search"
+              [queryParams]="searchByBrowseEntryParams(result)">
                 {{result.value}} ({{result.sources}})
             </a>
           </ng-container>
@@ -62,7 +63,8 @@
                     Related term
                 </ng-container>
               </span>
-              <a (click)="newBrowseFromHeading(heading)" href="javascript:void(0)">
+              <a routerLink="/staff/catalog/browse"
+                [queryParams]="newBrowseFromHeadingParams(heading)">
                 {{heading.heading}} ({{heading.target_count}})
               </a>
             </div>
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);
     }
 }
 

-----------------------------------------------------------------------

Summary of changes:
 .../app/staff/catalog/browse/results.component.html   |  6 ++++--
 .../src/app/staff/catalog/browse/results.component.ts | 19 +++++++++----------
 2 files changed, 13 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list