From 6ed7a723285519e7831dacd682b737793d175599 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 15 Mar 2021 13:37:24 -0400 Subject: [PATCH] LP1904036 Grid toolbarLabel option Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html | 3 +++ Open-ILS/src/eg2/src/app/share/grid/grid.component.ts | 4 ++++ Open-ILS/src/eg2/src/app/share/grid/grid.ts | 1 + 3 files changed, 8 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html index 492a583d93..db5cd3d991 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html @@ -4,6 +4,9 @@
+ + {{gridContext.toolbarLabel}} +
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts index dc8ac87c50..49a4becd86 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts @@ -120,6 +120,9 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy { @Input() cellTextGenerator: GridCellTextGenerator; + // If set, appears along the top left side of the grid. + @Input() toolbarLabel: string; + context: GridContext; // These events are emitted from our grid-body component. @@ -165,6 +168,7 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy { this.context.rowFlairIsEnabled = this.rowFlairIsEnabled === true; this.context.showDeclaredFieldsOnly = this.showDeclaredFieldsOnly; this.context.rowFlairCallback = this.rowFlairCallback; + this.context.toolbarLabel = this.toolbarLabel; this.context.disablePaging = this.disablePaging === true; this.context.cellTextGenerator = this.cellTextGenerator; this.context.ignoredFields = []; diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts index 3c46df8304..3b10e0d69f 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts @@ -533,6 +533,7 @@ export class GridContext { columnSet: GridColumnSet; autoGeneratedColumnOrder: string; rowSelector: GridRowSelector; + toolbarLabel: string; toolbarButtons: GridToolbarButton[]; toolbarCheckboxes: GridToolbarCheckbox[]; toolbarActions: GridToolbarAction[]; -- 2.11.0