[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 2f505a51fab34ff6d7ed299815472d7c04f3d2dd
Evergreen Git
git at git.evergreen-ils.org
Wed Jan 23 12:13:10 EST 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, rel_3_2 has been updated
via 2f505a51fab34ff6d7ed299815472d7c04f3d2dd (commit)
from 2dc42228985912b638e70107abaac3db61b91773 (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 2f505a51fab34ff6d7ed299815472d7c04f3d2dd
Author: Bill Erickson <berickxx at gmail.com>
Date: Wed Jan 23 12:09:18 2019 -0500
LP1808268 eg2 grid action disableOnRows sanity check
The === null test for determining if a disableOnRows handler was set was
not broad enough to capture undefined values. This commit changes it to
a more generic if() test to cover null/undefined. Also, instead of
creating a dummy function in the action, the testing code checks for the
presence of the function at run time.
Apply a fix to an ng-lint warning introduced by this series of commits in
the sandbox code.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts
index 85211e6..0a33376 100644
--- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts
+++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts
@@ -31,9 +31,7 @@ export class GridToolbarActionComponent implements OnInit {
const action = new GridToolbarAction();
action.label = this.label;
action.action = this.action;
-
- action.disableOnRows = (this.disableOnRows === null) ?
- (rows: any[]) => false : this.disableOnRows;
+ action.disableOnRows = this.disableOnRows;
this.grid.context.toolbarActions.push(action);
}
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 93df402..399a4c7 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
@@ -42,7 +42,10 @@ export class GridToolbarComponent implements OnInit {
}
shouldDisableAction(action: GridToolbarAction) {
- return action.disableOnRows(this.gridContext.getSelectedRows());
+ if (action.disableOnRows) {
+ return action.disableOnRows(this.gridContext.getSelectedRows());
+ }
+ return false;
}
printHtml() {
diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
index 6845290..a045740 100644
--- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
@@ -112,7 +112,7 @@ export class SandboxComponent implements OnInit {
};
this.complimentEvergreen = (rows: IdlObject[]) => alert('Evergreen is great!');
- this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length != 1);
+ this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length !== 1);
}
-----------------------------------------------------------------------
Summary of changes:
.../share/grid/grid-toolbar-action.component.ts | 4 +---
.../src/app/share/grid/grid-toolbar.component.ts | 5 ++++-
.../eg2/src/app/staff/sandbox/sandbox.component.ts | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list