sourceChange($event: NgbPanelChangeEvent) {
this.recordSource = $event.panelId;
- // Give the tab a chance to change before focusing.
- setTimeout(() =>
- this.renderer.selectRootElement(
- '#' + this.recordSource + '-input').focus()
- )
+ if ($event.nextState) { // panel opened
+
+ // give the panel a chance to render before focusing input
+ setTimeout(() => {
+ this.renderer.selectRootElement(
+ `#${this.recordSource}-input`).focus();
+ })
+ }
}
fileSelected($event) {
<input #fileSelector (change)="fileSelected($event)"
required class="form-control" type="file"/>
</div>
+ <div class="col-lg-3" *ngIf="bibTrashGroups.length">
+ <label i18n>Remove MARC Field Groups</label>
+ </div>
+ <div class="col-lg-3" *ngIf="bibTrashGroups.length">
+ <select multiple [(ngModel)]="selectedTrashGroups"
+ class="form-control" size="3">
+ <option *ngFor="let grp of bibTrashGroups"
+ value="{{grp.id()}}">{{grp.label()}}</option>
+ </select>
+ </div>
</div>
<div class="row" *ngIf="importSelection()">
<div class="col-lg-3">
opp_acq_copy_overlay?: boolean;
merge_profile?: any;
fall_through_merge_profile?: any;
- strip_field_groups?: any;
+ strip_field_groups?: number[];
}
@Component({
// a load-time queue before the queue combobox entries exist.
startQueueId: number;
+ bibTrashGroups: IdlObject[];
+ selectedTrashGroups: number[];
+
activeQueueId: number;
selectedBucket: number;
selectedBibSource: number;
this.minQualityRatio = 0;
this.selectedBibSource = 1; // default to system local
this.recordType = 'bib';
+ this.bibTrashGroups = [];
if (this.vandelay.importSelection) {
this.vandelay.getBibBuckets(),
this.vandelay.getBibSources(),
this.vandelay.getItemImportDefs(),
+ this.vandelay.getBibTrashGroups().then(
+ groups => this.bibTrashGroups = groups),
this.org.settings(['vandelay.default_match_set']).then(
s => this.defaultMatchSet = s['vandelay.default_match_set'])
];
opp_acq_copy_overlay: this.autoOverlayAcqCopies,
merge_profile: this.selectedMergeProfile,
fall_through_merge_profile: this.selectedFallThruMergeProfile,
- strip_field_groups: null // TODO
+ strip_field_groups: this.selectedTrashGroups
};
if (this.vandelay.importSelection) {