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

Evergreen Git git at git.evergreen-ils.org
Sat Feb 17 11:41:44 EST 2018


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  ad87d0b11ac1530a7d7c07e4a089b8cf25851dba (commit)
      from  870569b06ff9b40e62ccdd65c7378920c67f1347 (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 ad87d0b11ac1530a7d7c07e4a089b8cf25851dba
Author: Jason Stephenson <jason at sigio.com>
Date:   Wed Feb 14 18:32:46 2018 -0500

    Lp 1749593: Fix TypeError: Cannot set property 'grid' of undefined
    
    Commit b35f0c0 added a reference to the grid in the grid.dataProvider
    in services/grid.js in the web staff client.  This is great, but the
    dataProvider could be undefined where it was being set.  This leads to
    busted grid views and a TypeError in the console.
    
    This commit moves the code down until after a fallback dataProvider is
    used when the dataProvider is undefined and thereby avoids both
    problems of adding the grid to an undefined dataProvider.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 7144970..17fc743 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -178,9 +178,6 @@ angular.module('egGridMod',
                 delete $scope.idField;
 
                 grid.dataProvider = $scope.itemsProvider;
-                // make grid ref available in get() to set totalCount, if known.
-                // this allows us disable the 'next' paging button correctly
-                grid.dataProvider.grid = grid;
 
                 if (!grid.indexField && grid.idlClass)
                     grid.indexField = egCore.idl.classes[grid.idlClass].pkey;
@@ -222,6 +219,10 @@ angular.module('egGridMod',
                     });
                 }
 
+                // make grid ref available in get() to set totalCount, if known.
+                // this allows us disable the 'next' paging button correctly
+                grid.dataProvider.grid = grid;
+
                 grid.dataProvider.columnsProvider = grid.columnsProvider;
 
                 $scope.itemFieldValue = grid.dataProvider.itemFieldValue;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/staff/services/grid.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list