[open-ils-commits] [GIT] Evergreen ILS branch master updated. 795c2f3c93356059439788e32950e767be343d43

Evergreen Git git at git.evergreen-ils.org
Wed Jan 23 12:12:52 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, master has been updated
       via  795c2f3c93356059439788e32950e767be343d43 (commit)
      from  9776fd8bcb298aa6c97c0e7bf4ca64ca850269a0 (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 795c2f3c93356059439788e32950e767be343d43
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 0389521..9760599 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
@@ -113,7 +113,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