Lp 1913219: Use window.open for staff catalog edit link; angular version
authorJane Sandberg <sandbej@linnbenton.edu>
Tue, 2 Feb 2021 19:58:16 +0000 (11:58 -0800)
committerJason Stephenson <jason@sigio.com>
Fri, 12 Feb 2021 17:15:50 +0000 (12:15 -0500)
Backport to rel_3_5 required conflict resolution in
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts

index 8c511c3..274fae0 100644 (file)
@@ -10,8 +10,8 @@
   <a class="pl-1" target="_blank" 
     href="/eg/staff/cat/item/{{copy.id}}" i18n>View</a>
   | 
-  <a class="pl-1" target="_blank"
-    href="/eg/staff/cat/item/{{copy.id}}/edit" i18n>Edit</a>
+  <a class="pl-1" href="javascript:;"
+    (click)="openHoldingsEditor(copy.id)" i18n>Edit</a>
   </div>
 </ng-template>
 
index bfc2b03..0b99768 100644 (file)
@@ -31,6 +31,8 @@ export class CopiesComponent implements OnInit {
 
     cellTextGenerator: GridCellTextGenerator;
 
+    openHoldingsEditor: (item: number) => void;
+
     constructor(
         private net: NetService,
         private org: OrgService,
@@ -61,6 +63,10 @@ export class CopiesComponent implements OnInit {
             holdable: row => this.copyContext.holdable(row),
             barcode: row => row.barcode
         };
+
+        this.openHoldingsEditor = (item: number) => {
+            window.open('/eg/staff/cat/item/' + item + '/edit', '_blank');
+        };
     }
 
     collectData() {