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>
Wed, 10 Feb 2021 20:15:15 +0000 (15:15 -0500)
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 21b8d9f..b3fc10a 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}}" 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>
 
   </div>
 </ng-template>
 
index b9f2ec6..b12d8e3 100644 (file)
@@ -34,6 +34,8 @@ export class CopiesComponent implements OnInit {
 
     cellTextGenerator: GridCellTextGenerator;
 
 
     cellTextGenerator: GridCellTextGenerator;
 
+    openHoldingsEditor: (item: number) => void;
+
     constructor(
         private course: CourseService,
         private net: NetService,
     constructor(
         private course: CourseService,
         private net: NetService,
@@ -75,6 +77,11 @@ export class CopiesComponent implements OnInit {
                 this.copyGrid.reload();
             }
         });
                 this.copyGrid.reload();
             }
         });
+
+        this.openHoldingsEditor = (item: number) => {
+            window.open('/eg/staff/cat/item/' + item + '/edit', '_blank');
+        }
+
     }
 
     orgName(orgId: number): string {
     }
 
     orgName(orgId: number): string {