[open-ils-commits] [GIT] Evergreen ILS branch rel_3_5 updated. bef7fea28c268e921926e52d1c000c7512a01353

Evergreen Git git at git.evergreen-ils.org
Fri May 1 09:31:24 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, rel_3_5 has been updated
       via  bef7fea28c268e921926e52d1c000c7512a01353 (commit)
      from  ece690e0e87e29aa90f208f3cedd44534098f225 (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 bef7fea28c268e921926e52d1c000c7512a01353
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