LP#1792188: Record -> View Holds fails to refresh on Next/Prev record user/miker/lp-1792188-record-holds-paging
authorMike Rylander <mrylander@gmail.com>
Fri, 14 Sep 2018 13:52:03 +0000 (09:52 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 14 Sep 2018 13:52:03 +0000 (09:52 -0400)
Here we clean up and add back a call to refresh the holds list when navigating
between records in a result set.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index 43af4d5..644527a 100644 (file)
@@ -590,6 +590,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
                 $scope.conjoinedGridDataProvider.refresh();
             });
             init_parts_url();
+            $scope.grid_actions.refresh();
             $location.update_path('/cat/catalog/record/' + $scope.record_id);
             // update_path() bypasses the controller for path 
             // /cat/catalog/record/:record_id. Manually set title here too.
@@ -1703,13 +1704,14 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
     // ------------------------------------------------------------------
     // Holds 
     var provider = egGridDataProvider.instance({});
+    var holds = []; // current list of holds
+    var hold_count = 0;
+
     $scope.hold_grid_data_provider = provider;
     $scope.grid_actions = egHoldGridActions;
     $scope.grid_actions.refresh = function () { holds = []; hold_count = 0; provider.refresh() };
     $scope.hold_grid_controls = {};
 
-    var holds = []; // current list of holds
-    var hold_count = 0;
     provider.get = function(offset, count) {
         if ($scope.record_tab != 'holds') return $q.when();