LP#1697954: Enable clientsort for user holds lists
authorMike Rylander <mrylander@gmail.com>
Wed, 14 Jun 2017 15:51:53 +0000 (11:51 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 30 Jun 2017 14:44:29 +0000 (10:44 -0400)
These will generally be small, so we'll fetch all the data to support client-
side sorting.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/holds.js

index 665ca04..5fa3b96 100644 (file)
@@ -1,6 +1,6 @@
 <eg-grid
   id-field="id"
 <eg-grid
   id-field="id"
-  features="-sort,-multisort"
+  features="clientsort"
   items-provider="gridDataProvider"
   persist-key="circ.patron.holds"
   dateformat="{{$root.egDateAndTimeFormat}}">
   items-provider="gridDataProvider"
   persist-key="circ.patron.holds"
   dateformat="{{$root.egDateAndTimeFormat}}">
@@ -53,8 +53,8 @@
     </a>
   </eg-grid-field>
 
     </a>
   </eg-grid-field>
 
-  <eg-grid-field label="[% l('Patron Barcode') %]" hidden>{{item.patron_barcode}}</eg-grid-field>
-  <eg-grid-field label="[% l('Patron alias') %]" hidden>{{item.patron_alias}}</eg-grid-field>
+  <eg-grid-field label="[% l('Patron Barcode') %]" path="patron_barcode" hidden>{{item.patron_barcode}}</eg-grid-field>
+  <eg-grid-field label="[% l('Patron alias') %]" path="patron_alias" hidden>{{item.patron_alias}}</eg-grid-field>
   <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time' datatype="timestamp"></eg-grid-field>
index ddbf1d8..4013bc7 100644 (file)
@@ -50,8 +50,8 @@ function($scope,  $q,  $routeParams,  egCore,  egUser,  patronSvc,
     $scope.gridDataProvider = provider;
 
     function fetchHolds(offset, count) {
     $scope.gridDataProvider = provider;
 
     function fetchHolds(offset, count) {
-        var ids = patronSvc.hold_ids.slice(offset, offset + count);
-        return egHolds.fetch_holds(ids).then(null, null,
+        //var ids = patronSvc.hold_ids.slice(offset, offset + count); // we're going to just fetch all the holds up front
+        return egHolds.fetch_holds(patronSvc.hold_ids).then(null, null,
             function(hold_data) { 
                 patronSvc.holds.push(hold_data);
                 return hold_data;
             function(hold_data) { 
                 patronSvc.holds.push(hold_data);
                 return hold_data;