LP1910452 Remove staff catalog read-only OPAC Patron View
authorBill Erickson <berickxx@gmail.com>
Thu, 29 Jul 2021 20:02:44 +0000 (16:02 -0400)
committerJason Etheridge <jason@EquinoxOLI.org>
Fri, 13 Aug 2021 21:10:50 +0000 (17:10 -0400)
This is superseded by a new Patron View button.

Also removes the underlying component, since it's not longer used
anywhere.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/catalog/catalog.module.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.html [deleted file]
Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.ts [deleted file]
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html

index 4df2ffd..89eb2b0 100644 (file)
@@ -11,7 +11,6 @@ import {SearchFormComponent} from './search-form.component';
 import {ResultsComponent} from './result/results.component';
 import {RecordComponent} from './record/record.component';
 import {CopiesComponent} from './record/copies.component';
-import {OpacViewComponent} from './record/opac.component';
 import {ResultPaginationComponent} from './result/pagination.component';
 import {ResultFacetsComponent} from './result/facets.component';
 import {ResultRecordComponent} from './result/record.component';
@@ -57,7 +56,6 @@ import {BrowsePagerComponent} from './result/browse-pager.component';
     HoldingsMaintenanceComponent,
     SearchTemplatesComponent,
     CnBrowseComponent,
-    OpacViewComponent,
     PreferencesComponent,
     CnBrowseResultsComponent,
     BrowsePagerComponent
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.html
deleted file mode 100644 (file)
index adbaeec..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-<div *ngIf="!loaded" class="m-3 p-3 d-flex justify-content-center">
-  <div><img src="/images/progressbar_green.gif"/></div>
-</div>
-
-<ng-container *ngIf="url">
-  <iframe id='opac-iframe' class="w-100" (load)="handleLoad()" [src]="url">
-  </iframe> 
-</ng-container>
-
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/opac.component.ts
deleted file mode 100644 (file)
index 98eadf3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-import {Component, Input, Renderer2} from '@angular/core';
-import {DomSanitizer} from '@angular/platform-browser';
-
-const OPAC_BASE_URL = '/eg/opac/record';
-
-@Component({
-  selector: 'eg-opac-record-detail',
-  templateUrl: 'opac.component.html'
-})
-export class OpacViewComponent {
-
-    url; // SafeResourceUrlImpl
-    loaded: boolean;
-
-    _recordId: number;
-    @Input() set recordId(id: number) {
-
-        // Verify record ID is numeric only
-        if (id && (id + '').match(/^\d+$/)) {
-            this._recordId = id;
-            this.url = this.sanitizer.bypassSecurityTrustResourceUrl(
-                `${OPAC_BASE_URL}/${id}?readonly=1`);
-        } else {
-            this._recordId = null;
-            this.url = null;
-        }
-    }
-
-    get recordId(): number {
-        return this._recordId;
-    }
-
-    constructor(
-        private sanitizer: DomSanitizer,
-        private renderer: Renderer2) {}
-
-    handleLoad() {
-        const iframe = this.renderer.selectRootElement('#opac-iframe');
-
-        // 50 extra px adds enough space to avoid the scrollbar altogether
-        const height = 50 + iframe.contentWindow.document.body.offsetHeight;
-
-        iframe.style.height = `${height}px`;
-        this.loaded = true;
-    }
-}
-
index 0630d3b..693c288 100644 (file)
           </ng-container>
         </ng-template>
       </ngb-tab>
-      <ngb-tab title="Patron View" i18n-title id="catalog">
-        <ng-template ngbTabContent>
-          <eg-opac-record-detail [recordId]="recordId">
-          </eg-opac-record-detail>
-        </ng-template>
-      </ngb-tab>
     </ngb-tabset>
   </div>
 </div>