From: Stephanie Leary Date: Wed, 19 Oct 2022 20:49:41 +0000 (-0500) Subject: LP1948693 Migrate from NgbTabset to ngbTab X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fsleary%2Flp1948693-ngbTabset-to-ngbNav;p=working%2FEvergreen.git LP1948693 Migrate from NgbTabset to ngbTab Updates the deprecated NgbTabset components to ngbNav and adds directive for keyboard navigation. Signed-off-by: Stephanie Leary --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html index d769a72df5..9125d4e5e9 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html @@ -45,9 +45,10 @@
- - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts index 159bcb92ec..53228fa0e4 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit, AfterViewInit, ViewChild, ChangeDetectorRef, OnDestroy} from '@angular/core'; import {filter, takeUntil} from 'rxjs/operators'; import {Subject, Observable, of} from 'rxjs'; -import {NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute, ParamMap, RouterEvent, NavigationEnd} from '@angular/router'; import {IdlService} from '@eg/core/idl.service'; import {AcqProviderSummaryPaneComponent} from './summary-pane.component'; @@ -36,7 +36,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild('createErrString', { static: false }) createErrString: StringComponent; @ViewChild('leaveConfirm', { static: true }) leaveConfirm: ConfirmDialogComponent; - onTabChange: ($event: NgbTabChangeEvent) => void; + onNavChange: ($event: NgbNavChangeEvent) => void; onDesireSummarize: ($event: number, updateSummaryOnly?: boolean, hideSearchForm?: boolean) => void; onSummaryToggled: ($event: boolean) => void; @@ -112,7 +112,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit, OnDestroy { this.showSearchForm = true; } - this.onTabChange = ($event) => { + this.onNavChange = ($event) => { $event.preventDefault(); this.canDeactivate().subscribe(canLeave => { if (!canLeave) { return; } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.ts index fb9eb4e2aa..3ac42bcad0 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.ts @@ -1,7 +1,7 @@ import {Component, Input, ViewChild, OnInit} from '@angular/core'; import {tap, concatMap} from 'rxjs/operators'; import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {OrgService} from '@eg/core/org.service'; import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/negative-balances/list.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/negative-balances/list.component.ts index 2317ab92a5..822f1f5d79 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/negative-balances/list.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/negative-balances/list.component.ts @@ -2,7 +2,7 @@ import {Component, Input, ViewChild, OnInit} from '@angular/core'; import {EMPTY} from 'rxjs'; import {map, tap, concatMap} from 'rxjs/operators'; import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {OrgService} from '@eg/core/org.service'; import {AuthService} from '@eg/core/auth.service'; import {NetService} from '@eg/core/net.service'; diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.html index 86f2f20d81..9973e6b53b 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.html @@ -1,8 +1,9 @@ - - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.ts index 73b3a7bca6..550b52c0d8 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.ts @@ -6,7 +6,7 @@ import {ToastService} from '@eg/share/toast/toast.service'; import {NetService} from '@eg/core/net.service'; import {AuthService} from '@eg/core/auth.service'; import {IdlObject, IdlService } from '@eg/core/idl.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; @Component({ templateUrl: './survey-edit.component.html' @@ -83,7 +83,7 @@ export class SurveyEditComponent implements OnInit { }); } - onTabChange(event: NgbTabChangeEvent) { + onNavChange(event: NgbNavChangeEvent) { this.surveyTab = event.nextId; } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html index 0955e981ad..1958916970 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html @@ -37,9 +37,10 @@ - - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts index 160e9725e0..9c17966cbc 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts @@ -1,7 +1,7 @@ import {Component, Input, ViewChild, OnInit} from '@angular/core'; import {Tree, TreeNode} from '@eg/share/tree/tree'; import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {OrgService} from '@eg/core/org.service'; import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; @@ -20,6 +20,7 @@ export class OrgUnitComponent implements OnInit { tree: Tree; selected: TreeNode; winHeight = 500; + orgUnitTab: string; @ViewChild('editString', { static: true }) editString: StringComponent; @ViewChild('errorString', { static: true }) errorString: StringComponent; @@ -39,7 +40,7 @@ export class OrgUnitComponent implements OnInit { this.loadAouTree(this.org.root().id()); } - tabChanged(evt: NgbTabChangeEvent) { + navChanged(evt: NgbNavChangeEvent) { const tab = evt.nextId; // stubbing out in case we need it. } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.ts index 0276005cb3..80a0c67a12 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.ts @@ -11,7 +11,7 @@ import {ComboboxComponent, ComboboxEntry } from '@eg/share/combobox/combobox.component'; import {PrintService} from '@eg/share/print/print.service'; import {LocaleService} from '@eg/core/locale.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component'; import {SampleDataService} from '@eg/share/util/sample-data.service'; import {OrgFamily} from '@eg/share/org-family-select/org-family-select.component'; @@ -39,7 +39,7 @@ export class PrintTemplateComponent implements OnInit { selectedOrgs: number[]; @ViewChild('templateSelector', { static: true }) templateSelector: ComboboxComponent; - @ViewChild('tabs', { static: false }) tabs: NgbTabset; + @ViewChild('tabs', { static: false }) tabs: NgbNav; @ViewChild('editDialog', { static: true }) editDialog: FmRecordEditorComponent; @ViewChild('confirmDelete', { static: true }) confirmDelete: ConfirmDialogComponent; @ViewChild('printContextCbox', {static: false}) printContextCbox: ComboboxComponent; @@ -112,7 +112,7 @@ export class PrintTemplateComponent implements OnInit { this.sampleData.holds_for_bib = wide_holds; } - onTabChange(evt: NgbTabChangeEvent) { + onTabChange(evt: NgbNavChangeEvent) { if (evt.nextId === 'template') { this.refreshPreview(); } diff --git a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html index 4dc4d89c8c..e7d2df1acd 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html +++ b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html @@ -27,13 +27,13 @@

Reservation details

- - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts index 6e3ae3563b..ad83b6b677 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts @@ -3,7 +3,7 @@ import {FormGroup, FormControl, ValidationErrors, ValidatorFn, FormArray} from ' import {Router, ActivatedRoute} from '@angular/router'; import {from, iif, Observable, of, throwError, timer, Subscription} from 'rxjs'; import {catchError, debounceTime, takeLast, mapTo, single, switchMap, tap} from 'rxjs/operators'; -import {NgbCalendar, NgbTabset} from '@ng-bootstrap/ng-bootstrap'; +import {NgbCalendar, NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {AuthService} from '@eg/core/auth.service'; import {ComboboxEntry} from '@eg/share/combobox/combobox.component'; import {FormatService} from '@eg/core/format.service'; @@ -68,9 +68,10 @@ export class CreateReservationComponent implements OnInit, AfterViewInit, OnDest changeGranularity: ($event: ComboboxEntry) => void; dateRange: DateRange; + detailsTab: string = ''; @ViewChild('createDialog', { static: true }) createDialog: CreateReservationDialogComponent; - @ViewChild('details', { static: true }) details: NgbTabset; + @ViewChild('details', { static: true }) details: NgbNav; @ViewChild('noTimezoneSetDialog', { static: true }) noTimezoneSetDialog: NoTimezoneSetComponent; @ViewChild('viewReservation', { static: true }) viewReservation: FmRecordEditorComponent; @ViewChildren('scheduleGrid') scheduleGrids: QueryList; diff --git a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html index 1a7e94b8da..a15bcc2cd3 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html +++ b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html @@ -10,12 +10,12 @@

Filter reservations

- - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts index 25ef296c32..5d4cea9d1b 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts @@ -3,7 +3,7 @@ import {FormGroup, FormControl} from '@angular/forms'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {Subscription, of} from 'rxjs'; import {debounceTime, single, tap, switchMap} from 'rxjs/operators'; -import {NgbTabset} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {ReservationsGridComponent} from './reservations-grid.component'; @@ -27,7 +27,7 @@ export class ManageReservationsComponent implements OnInit, OnDestroy { startingTab: 'patron' | 'resource' | 'type' = 'patron'; startingPickupOrgs: OrgFamily = {primaryOrgId: this.auth.user().ws_ou(), includeDescendants: true}; - @ViewChild('filterTabs', { static: true }) filterTabs: NgbTabset; + @ViewChild('filterTabs', { static: true }) filterTabs: NgbNav; @ViewChild('reservationsGrid', { static: true }) reservationsGrid: ReservationsGridComponent; removeFilters: () => void; diff --git a/Open-ILS/src/eg2/src/app/staff/booking/return.component.html b/Open-ILS/src/eg2/src/app/staff/booking/return.component.html index 82758dd704..29b5bb4037 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/return.component.html +++ b/Open-ILS/src/eg2/src/app/staff/booking/return.component.html @@ -3,9 +3,11 @@
- - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/booking/return.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/return.component.ts index f37e10e8a3..24bc9082fb 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/return.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/return.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit, OnDestroy, QueryList, ViewChildren, ViewChild} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {FormGroup, FormControl, Validators} from '@angular/forms'; -import {NgbTabChangeEvent, NgbTabset} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Observable, from, of, Subscription} from 'rxjs'; import { single, switchMap, tap, debounceTime } from 'rxjs/operators'; import {PatronService} from '@eg/staff/share/patron/patron.service'; @@ -23,8 +23,8 @@ export class ReturnComponent implements OnInit, OnDestroy { subscriptions: Subscription[] = []; noSelectedRows: (rows: IdlObject[]) => boolean; - handleTabChange: ($event: NgbTabChangeEvent) => void; - @ViewChild('tabs', { static: true }) tabs: NgbTabset; + handleNavChange: ($event: NgbNavChangeEvent) => void; + @ViewChild('tabs', { static: true }) tabs: NgbNav; @ViewChildren(ReservationsGridComponent) grids: QueryList; constructor( @@ -95,7 +95,7 @@ export class ReturnComponent implements OnInit, OnDestroy { ); this.noSelectedRows = (rows: IdlObject[]) => (rows.length === 0); - this.handleTabChange = ($event) => { + this.handleNavChange = ($event) => { this.store.setItem('eg.booking.return.tab', $event.nextId) .then(() => { this.router.navigate(['/staff', 'booking', 'return']); diff --git a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.html b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.html index c1951feda7..0e92e63717 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.html @@ -12,24 +12,26 @@ - - - + +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts index 95c0193f75..5e70b6316e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {Observable} from 'rxjs'; import {map, switchMap} from 'rxjs/operators'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {IdlObject} from '@eg/core/idl.service'; import {Pager} from '@eg/share/util/pager'; import {NetService} from '@eg/core/net.service'; @@ -66,7 +66,7 @@ export class ManageAuthorityComponent implements OnInit { // Changing a tab in the UI means changing the route. // Changing the route ultimately results in changing the tab. - beforeTabChange(evt: NgbTabChangeEvent) { + beforeNavChange(evt: NgbNavChangeEvent) { // prevent tab changing until after route navigation evt.preventDefault(); diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html index 78a86ed34c..6e20ee588e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html @@ -1,17 +1,21 @@ - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts index 7d1eceb4d4..86c60c792d 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; @Component({ templateUrl: 'display-attrs.component.html' @@ -20,7 +20,7 @@ export class DisplayAttrsComponent { // Changing a tab in the UI means changing the route. // Changing the route ultimately results in changing the tab. - onTabChange(evt: NgbTabChangeEvent) { + onNavChange(evt: NgbNavChangeEvent) { this.attrType = evt.nextId; // prevent tab changing until after route navigation diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.html index fd69cf93bd..5200048b10 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.html @@ -20,17 +20,22 @@ - - - + + +
\ No newline at end of file diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts index 64a4b35188..34a2f412ad 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts @@ -1,6 +1,6 @@ import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {IdlObject} from '@eg/core/idl.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {OrgService} from '@eg/core/org.service'; @@ -36,7 +36,7 @@ export class MatchSetComponent implements OnInit { // Changing a tab in the UI means changing the route. // Changing the route ultimately results in changing the tab. - onTabChange(evt: NgbTabChangeEvent) { + onNavChange(evt: NgbNavChangeEvent) { this.matchSetTab = evt.nextId; // prevent tab changing until after route navigation diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html index ed643d90a0..ee3cc02a80 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html @@ -9,14 +9,17 @@ - - + + +
\ No newline at end of file diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts index 872f0e59e7..120f84a68a 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {PcrudService} from '@eg/core/pcrud.service'; import {IdlObject} from '@eg/core/idl.service'; @@ -33,7 +33,7 @@ export class QueuedRecordComponent { // Changing a tab in the UI means changing the route. // Changing the route ultimately results in changing the tab. - onTabChange(evt: NgbTabChangeEvent) { + onNavChange(evt: NgbNavChangeEvent) { this.recordTab = evt.nextId; // prevent tab changing until after route navigation diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html index d4f711e2ce..dd3346e207 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html @@ -36,35 +36,40 @@ (click)="setDefaultTab()" i18n>Set Default View - - - + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts index 80e6e19e46..619a5a0f1f 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit, Input, ViewChild, HostListener} from '@angular/core'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {PcrudService} from '@eg/core/pcrud.service'; import {IdlObject} from '@eg/core/idl.service'; @@ -25,7 +25,7 @@ export class RecordComponent implements OnInit { recordTab: string; summary: BibRecordSummary; searchContext: CatalogSearchContext; - @ViewChild('recordTabs', { static: true }) recordTabs: NgbTabset; + @ViewChild('recordTabs', { static: true }) recordTabs: NgbNav; @ViewChild('marcEditor', {static: false}) marcEditor: MarcEditorComponent; @ViewChild('holdingsMaint', {static: false}) @@ -83,7 +83,7 @@ export class RecordComponent implements OnInit { // Changing a tab in the UI means changing the route. // Changing the route ultimately results in changing the tab. - beforeTabChange(evt: NgbTabChangeEvent) { + beforeNavChange(evt: NgbNavChangeEvent) { // prevent tab changing until after route navigation evt.preventDefault(); diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.css b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.css index 4d2842e618..100da1b604 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.css +++ b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.css @@ -23,6 +23,4 @@ select.form-control:not([size]):not([multiple]) { .tab-content { padding: 5px; - margin-top: 25px; - font-weight: bold; } diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html index e75ef48fe9..9655e29c91 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html @@ -31,9 +31,10 @@
- - - +
- - - + +
  • + Numeric Search +
    @@ -285,9 +287,10 @@
    - - - +
  • +
  • + MARC Search +
    - - - +
  • +
  • + Browse +
    @@ -349,9 +353,10 @@
    - - - +
  • +
  • + Shelf Browse +
    - - +
  • + + +
    +
    diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts index c7d9898be9..60c92e5ece 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts @@ -6,7 +6,7 @@ import {ServerStoreService} from '@eg/core/server-store.service'; import {CatalogService} from '@eg/share/catalog/catalog.service'; import {CatalogSearchContext, CatalogSearchState} from '@eg/share/catalog/search-context'; import {StaffCatalogService} from './catalog.service'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; // Maps opac-style default tab names to local tab names. const LEGACY_TAB_NAME_MAP = { @@ -144,7 +144,7 @@ export class SearchFormComponent implements OnInit, AfterViewInit { }); } - onTabChange(evt: NgbTabChangeEvent) { + onNavChange(evt: NgbNavChangeEvent) { this.searchTab = evt.nextId; // Focus after tab-change event has a chance to complete diff --git a/Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts index 298325bc14..70470a708e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts @@ -1,5 +1,5 @@ import {Component} from '@angular/core'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {PcrudService} from '@eg/core/pcrud.service'; import {AuthService} from '@eg/core/auth.service'; diff --git a/Open-ILS/src/eg2/src/styles.css b/Open-ILS/src/eg2/src/styles.css index 4e1366e870..d96e5ada7e 100644 --- a/Open-ILS/src/eg2/src/styles.css +++ b/Open-ILS/src/eg2/src/styles.css @@ -288,7 +288,7 @@ body>.dropdown-menu {z-index: 2100;} * 5. Turning off view encapsulation for the acq search component * breaks a lot of styles. */ -#acq-search-page ngb-tabset .nav.nav-tabs { +#acq-search-page ngbNav .nav.nav-tabs { background-color: rgb(247, 247, 247); }