From: Bill Erickson Date: Fri, 24 Apr 2020 21:44:53 +0000 (-0400) Subject: LP1843837 Vandelay queue Select All Rows option X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=99d7af102101f2465d9b29ad75fdf3768a2bd3ad;p=working%2FEvergreen.git LP1843837 Vandelay queue Select All Rows option Adds an option to the Vandelay Queue grid to select all rows via grid toolbar checkbox. This was necessary to replace the functionality lost by disabing grid paging to support persistent grid import selection. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html index 1aff1af77f..abc7ce47bb 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html @@ -2,6 +2,9 @@ + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts index a3496a3b9b..7a72fe657c 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts @@ -37,6 +37,7 @@ export class QueueComponent implements OnInit, AfterViewInit { @ViewChild('queueGrid', { static: true }) queueGrid: GridComponent; @ViewChild('confirmDelDlg', { static: false }) confirmDelDlg: ConfirmDialogComponent; @ViewChild('progressDlg', { static: true }) progressDlg: ProgressDialogComponent; + @ViewChild('progressSelect', {static: false}) progressSelect: ProgressDialogComponent; cellTextGenerator: GridCellTextGenerator; @@ -210,6 +211,27 @@ export class QueueComponent implements OnInit, AfterViewInit { this.vandelay.importSelection.recordIds.includes(rowId); } + toggleSelectRows(checked: boolean) { + + if (checked) { + this.progressSelect.open(); + this.queueGrid.context.getAllRows().then(_ => { + this.queueSource.data.forEach(row => { + if (!this.rowIsSelected(row)) { + this.rowClicked(row); + } + }); + this.progressSelect.close(); + }); + + } else { + const selection = this.vandelay.importSelection; + if (selection) { + selection.recordIds = []; + } + } + } + rowClicked(row: any) { const selection = this.findOrCreateImportSelection(); if (selection.recordIds.includes(row.id)) {