patron search use new grid selection
authorBill Erickson <berick@esilibrary.com>
Fri, 23 May 2014 18:27:51 +0000 (14:27 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 23 May 2014 18:27:51 +0000 (14:27 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/circ/patron/t_search_results.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index 84e8792..38e715c 100644 (file)
@@ -4,7 +4,7 @@
   main-label="[% l('Patron Search Results') %]"
   items-provider="patronSearchGridProvider"
   activate-item="activatePatron"
-  on-item-selected="gridItemSelected"
+  on-selection-change="gridSelectionChanged"
   persist-key="circ.patron.search">
   <eg-grid-field label="[% ('ID') %]" path='id' visible></eg-grid-field>
   <eg-grid-field label="[% ('Card') %]" path='card.barcode' visible></eg-grid-field>
index 75a4874..0020d9f 100644 (file)
@@ -37,6 +37,7 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap',
         // app-globally modify the default flesh fields for 
         // fleshed user retrieval
         egUser.defaultFleshFields = egUser.defaultFleshFields.concat([
+            'profile',
             'net_access_level',
             'ident_type',
             'ident_type2',
@@ -465,10 +466,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
         return {offset : 0};
     }
 
-    // FIXME: use onItemSelect instead
-    $scope.gridItemSelected = function(item) {
-        if (item)  // null if de-selecting
-            patronSvc.setDefault(null, item); 
+    $scope.gridSelectionChanged = function(all) {
+        if (all[0])
+            patronSvc.setDefault(null, all[0]);
     }
 
     provider.get = function(offset, count) {