[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0ab8e87a0e0f551cccdbce41495117dd54ba709a
Evergreen Git
git at git.evergreen-ils.org
Tue Jul 16 13:56:14 EDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 0ab8e87a0e0f551cccdbce41495117dd54ba709a (commit)
from bd51ae1f99c30fb188877d2ae187276f71af6f8f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0ab8e87a0e0f551cccdbce41495117dd54ba709a
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date: Sat May 25 18:46:03 2019 -0700
LP1828840: Option to hide grid save settings button in angular grid
To test:
1) Apply this commit.
2) Create an eg-grid in the Angular staff client without a persistKey
attribute (or use the one in the sandbox).
3) Compile the client and open the grid in your browser. Open the
column picker menu. Note that the Save button does not display.
4) Add an arbitrary value to the persistKey attribute.
5) Repeat step 3. Note that the Save button does display.
6) Change the value of the persistKey attribute to "disabled".
7) Repeat step 3. Note that the Save button does not display.
Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx at gmail.com>
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 6be92080a3..be7b19cb7e 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
@@ -109,6 +109,7 @@
<span class="ml-2" i18n>Manage Column Widths</span>
</a>
<a class="dropdown-item label-with-material-icon"
+ *ngIf="!disableSaveSettings"
(click)="saveGridConfig()">
<span class="material-icons">save</span>
<span class="ml-2" i18n>Save Grid Settings</span>
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts
index 308fdd012a..fbc826c062 100644
--- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts
+++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts
@@ -16,6 +16,7 @@ export class GridToolbarComponent implements OnInit {
@Input() gridContext: GridContext;
@Input() colWidthConfig: GridColumnWidthComponent;
@Input() gridPrinter: GridPrintComponent;
+ @Input() disableSaveSettings = false;
renderedGroups: {[group: string]: boolean};
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid.component.html
index 4a6ae6ec9b..20015cab19 100644
--- a/Open-ILS/src/eg2/src/app/share/grid/grid.component.html
+++ b/Open-ILS/src/eg2/src/app/share/grid/grid.component.html
@@ -4,7 +4,8 @@
<eg-grid-toolbar
[gridContext]="context"
[gridPrinter]="gridPrinter"
- [colWidthConfig]="colWidthConfig">
+ [colWidthConfig]="colWidthConfig"
+ [disableSaveSettings]="!persistKey || ('disabled' === persistKey)">
</eg-grid-toolbar>
<eg-grid-header [context]="context"></eg-grid-header>
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 2b28d2db17..e4938cc739 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
@@ -42,6 +42,9 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy {
// Storage persist key / per-grid-type unique identifier
// The value is prefixed with 'eg.grid.'
+ //
+ // If persistKey is set to "disabled", or does not exist,
+ // the grid will not display a Save button to the user
@Input() persistKey: string;
@Input() disableSelect: boolean;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html | 1 +
Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts | 1 +
Open-ILS/src/eg2/src/app/share/grid/grid.component.html | 3 ++-
Open-ILS/src/eg2/src/app/share/grid/grid.component.ts | 3 +++
4 files changed, 7 insertions(+), 1 deletion(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list