testing code user/csharp/lp1731042_display_tcn_for_overlay_target
authorChris Sharp <csharp@georgialibraries.org>
Wed, 8 Nov 2017 20:58:58 +0000 (15:58 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 8 Nov 2017 20:58:58 +0000 (15:58 -0500)
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js

index 911e4f6..c559d08 100644 (file)
@@ -181,14 +181,37 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
         if (items[0]['service'] == 'native-evergreen-catalog') return false;
         return true;
     };
-
+/*
+diff --git a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
+index 911e4f6..04cb5d6 100644
+--- a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
++++ b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
+@@ -185,10 +185,11 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
+     $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()) {
++        if ($scope.local_overlay_target == items[0].doc_id()) {
+             $scope.local_overlay_target = 0;
+         } else {
+-            $scope.local_overlay_target = items[0].tcn();
++            $scope.local_overlay_target = items[0].doc_id();
++            $scope.local_overlay_target_tcn = items[0].tcn();
+         }
+
+===
+
+in the template, add a  <span>bla bla tcn is {{local_overlay_target_tcn}}</span> 
+
+*/
     $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()) {
+        if ($scope.local_overlay_target == items[0].doc_id()) {
             $scope.local_overlay_target = 0;
         } else {
-            $scope.local_overlay_target = items[0].tcn();
+            $scope.local_overlay_target = items[0].doc_id();
+            $scope.local_overlay_target_tcn = items[0].tcn();
         }
         egCore.hatch.setLocalItem('eg.cat.marked_overlay_record',$scope.local_overlay_target);
     }