webstaff: record buckets: implement show selected in catalog action
authorGalen Charlton <gmc@esilibrary.com>
Tue, 29 Sep 2015 21:45:51 +0000 (21:45 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:47 +0000 (14:58 -0500)
This replaces the show all in catalog action.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js

index c1b2085..421333b 100644 (file)
@@ -10,8 +10,8 @@
   [% INCLUDE 'staff/cat/bucket/record/t_grid_menu.tt2' %]
 
   <!-- actions drop-down -->
-  <eg-grid-action label="[% l('Show All in Catalog') %]"
-    handler="showAllRecords"></eg-grid-action>
+  <eg-grid-action label="[% l('Show Selected Records in Catalog') %]"
+    handler="showRecords"></eg-grid-action>
 
   <eg-grid-action label="[% l('Remove Selected Records') %]" 
     handler="detachRecords"></eg-grid-action>
index f07bea7..3ac7a5c 100644 (file)
@@ -607,14 +607,13 @@ function($scope,  $q , $routeParams,  bucketSvc,  egCore,  $window,
         });
     }
 
-    $scope.showAllRecords = function() {
-        // TODO: maybe show selected would be better?
+    $scope.showRecords = function(records) {
         // TODO: probably want to set a limit on the number of
         //       new tabs one could choose to open at once
-        angular.forEach(bucketSvc.currentBucket.items(), function(rec) {
+        angular.forEach(records, function(rec) {
             var url = egCore.env.basePath +
                       'cat/catalog/record/' +
-                      rec.target_biblio_record_entry();
+                      rec.id;
             $timeout(function() { $window.open(url, '_blank') });
         });
     }