From 63cebb9dcdb960d754322a4aad810d351e1f4a84 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 21 Jun 2017 11:35:15 -0400 Subject: [PATCH] LP#1697954 TODO comments for client sort all-fetching Add additional code comments further clarifying why some grids pre-fetch all rows (for client-side sorting) instead of fetching in pages. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/web/js/ui/default/staff/circ/patron/holds.js | 7 ++++++- Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js index 4013bc7221..e2c422b1c7 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js @@ -50,7 +50,12 @@ function($scope, $q, $routeParams, egCore, egUser, patronSvc, $scope.gridDataProvider = provider; function fetchHolds(offset, count) { - //var ids = patronSvc.hold_ids.slice(offset, offset + count); // we're going to just fetch all the holds up front + // TODO: LP#1697954 Fetch all holds on grid render to support + // client-side sorting. Migrate to server-side sorting to avoid + // the need for fetching all items. + + // we're going to just fetch all the holds up front + //var ids = patronSvc.hold_ids.slice(offset, offset + count); return egHolds.fetch_holds(patronSvc.hold_ids).then(null, null, function(hold_data) { patronSvc.holds.push(hold_data); diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index 94bc0f6668..449f19048c 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -106,6 +106,9 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ // fields on the bre to select. More may be needed. // note that fleshed fields are explicitly selected. select : { bre : ['id'] }, + // TODO: LP#1697954 Fetch all circs on grid render + // to support client-side sorting. Migrate to server-side + // sorting to avoid the need for fetching all items. //limit : count, //offset : offset, // we need an order-by to support paging @@ -134,6 +137,9 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ return egCore.pcrud.search('ancc', {id : id_list}, { flesh : 1, flesh_fields : {ancc : ['item_type','staff']}, + // TODO: LP#1697954 Fetch all circs on grid render + // to support client-side sorting. Migrate to server-side + // sorting to avoid the need for fetching all items. //limit : count, //offset : offset, // we need an order-by to support paging -- 2.11.0