From: Galen Charlton Date: Tue, 8 Sep 2020 19:58:19 +0000 (-0400) Subject: tweak single-click vs double-click retrieval from search results X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=680cc98396b4f301c7131d1b452891db2c52b610;p=working%2FEvergreen.git tweak single-click vs double-click retrieval from search results single click == retrieve, but continue to display search form double-click == retrieve and hide search form Signed-off-by: Galen Charlton --- 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 d4fa8d1de2..69aebda85c 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 @@ -30,7 +30,7 @@
- +
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 708819ca1b..95fa09fc3f 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 @@ -40,7 +40,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { onTabChange: ($event: NgbTabChangeEvent) => void; - onDesireSummarize: ($event: number, updateSummaryOnly?: boolean) => void; + onDesireSummarize: ($event: number, updateSummaryOnly?: boolean, hideSearchForm?: boolean) => void; onSummaryToggled: ($event: boolean) => void; previousUrl: string = null; @@ -116,7 +116,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { }); }; - this.onDesireSummarize = ($event, updateSummaryOnly = false) => { + this.onDesireSummarize = ($event, updateSummaryOnly = false, hideSearchForm = true) => { this.id = $event; this.providerRecord.fetch(this.id).then(() => { // $event is a provider ID @@ -128,7 +128,9 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { return; } this.providerRecord.announceProviderUpdated(); - this.showSearchForm = false; + if (hideSearchForm) { + this.showSearchForm = false; + } this.activeTab = this.defaultTabType; this.router.navigate(['/staff', 'acq', 'provider', this.id, this.activeTab]); }); diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html index c3ce484417..acd696f48a 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html @@ -13,7 +13,7 @@ [filterable]="true" [sortable]="true" [disableMultiSelect]="true" - (onRowClick)="previewRow($event, true)" + (onRowClick)="previewRow($event, false)" (onRowActivate)="previewRow($event)" [cellTextGenerator]="cellTextGenerator"> diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts index fd4d731d23..45d2981abc 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts @@ -23,9 +23,9 @@ export class ProviderResultsComponent implements OnInit { @ViewChild('providerSearchForm', { static: true }) providerSearchForm: AcqProviderSearchFormComponent; cellTextGenerator: GridCellTextGenerator; - @Output() previewRow: (row: any, updateSummaryOnly?: boolean) => void; - @Output('desireSummarize') summarize: EventEmitter = new EventEmitter(); - @Output('desireSummaryOnly') summaryOnly: EventEmitter = new EventEmitter(); + @Output() previewRow: (row: any, hideSearchForm?: boolean) => void; + @Output() desireSummarize: EventEmitter = new EventEmitter(); + @Output() summarizeSearchFormOpen: EventEmitter = new EventEmitter(); constructor( private elementRef: ElementRef, @@ -44,11 +44,11 @@ export class ProviderResultsComponent implements OnInit { name: row => row.name(), }; - this.previewRow = (row: any, updateSummaryOnly = false) => { - if (updateSummaryOnly) { - this.summaryOnly.emit(row.id()); + this.previewRow = (row: any, hideSearchForm = true) => { + if (hideSearchForm) { + this.desireSummarize.emit(row.id()); } else { - this.summarize.emit(row.id()); + this.summarizeSearchFormOpen.emit(row.id()); } } }