[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. b81e944f8f49fb75b0e15f332238919ca919def6

Evergreen Git git at git.evergreen-ils.org
Sat Feb 17 11:42:54 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, rel_3_0 has been updated
       via  b81e944f8f49fb75b0e15f332238919ca919def6 (commit)
      from  eb9ca01e659b9d238c895e96f7882dd7ba09b7ff (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 b81e944f8f49fb75b0e15f332238919ca919def6
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 b023df8..33fd892 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