activateItem support in patron grid; minor repairs
authorBill Erickson <berick@esilibrary.com>
Mon, 12 May 2014 19:32:37 +0000 (15:32 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 12 May 2014 19:32:37 +0000 (15:32 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/circ/patron/t_circ_exists_dialog.tt2
Open-ILS/src/templates/staff/circ/patron/t_search.tt2
Open-ILS/src/templates/staff/circ/patron/t_search_results.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js

index b687325..b1a3023 100644 (file)
@@ -14,7 +14,7 @@ This copy was checked out by another patron on [_1].
       </div>
       <div class="modal-footer">
         <button class="btn btn-warning" 
-            ng-click="cancel()">[% l('Cancel') %]</button>
+            ng-click="cancel($event)">[% l('Cancel') %]</button>
         <input type="submit" class="btn btn-primary" 
             value="[% l('Normal Checkin then Checkout') %]"/>
       </div>
index 3a14205..fab7e5c 100644 (file)
@@ -1,6 +1,4 @@
 
-<br/><br/> <!-- css -->
-
 <!-- TODO: inputs need sr-only labels
    <label class="sr-only" for="input-id">label</label>
 -->
index c3a3a96..1b2f213 100644 (file)
@@ -3,6 +3,7 @@
   features="-sort,-display,-multisort"
   main-label="[% l('Patron Search Results') %]"
   items-provider="patronSearchGridProvider"
+  activate-item="activatePatron"
   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 8365d26..bca5e76 100644 (file)
@@ -345,6 +345,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
     $scope.initTab('search');
     $scope.focusMe = true;
     $scope.searchArgs = {};
+    $scope.activatePatron = function(usr) {
+        $location.path('/circ/patron/' + usr.id() + '/checkout');
+    }
 
     // cache of object field values; speeds up grid rendering for
     // nested objects.  TODO: move into grid?
index 5828706..fcbc4a8 100644 (file)
@@ -218,7 +218,10 @@ function($scope,  $q,  $modal,  $routeParams,  egCore, egUser,  patronSvc ,
                 function($scope , $modalInstance , openCirc) {
                 $scope.circDate = openCirc.xact_start();
                 $scope.ok = function() { $modalInstance.close() }
-                $scope.cancel = function () { $modalInstance.dismiss() }
+                $scope.cancel = function($event) { 
+                    $modalInstance.dismiss();
+                    $event.preventDefault(); // form: prevent ok() from firing
+                }
             }],
             resolve : {
                 openCirc : function() {