webstaff: use localStorage for the overlay-record selection
authorJason Etheridge <jason@esilibrary.com>
Wed, 12 Aug 2015 17:52:05 +0000 (13:52 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:20 +0000 (15:44 -0400)
in the Import Record from z39.50 interface

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js

index 3b39d30..5476c71 100644 (file)
@@ -175,7 +175,7 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
         return true;
     };
 
-    $scope.local_overlay_target = 0;
+    $scope.local_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0;
     $scope.mark_as_overlay_target = function() {
         var items = $scope.gridControls.selectedItems();
         if ($scope.local_overlay_target == items[0].tcn()) {
@@ -183,6 +183,7 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
         } else {
             $scope.local_overlay_target = items[0].tcn();
         }
+        egCore.hatch.setLocalItem('eg.cat.marked_overlay_record',$scope.local_overlay_target);
     }
     $scope.cant_overlay = function() {
         if (!$scope.local_overlay_target) return true;