From: Galen Charlton Date: Thu, 15 Jan 2015 16:16:03 +0000 (+0000) Subject: LP#1402797 implement Show All in Catalog action for record buckets X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=46c3f0be689d3aad8c42b8bd68b6b3fd17d517d9;p=evergreen%2Fmasslnc.git LP#1402797 implement Show All in Catalog action for record buckets Note that this will typically require the brower's pop-up blocker to be disabled for the webstaff site. Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 index 39c866fe0d..b6768c5e9f 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 @@ -10,6 +10,9 @@ [% INCLUDE 'staff/cat/bucket/record/t_grid_menu.tt2' %] + + diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js index 937218e72f..5b4ad210d3 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js @@ -484,8 +484,10 @@ function($scope, $routeParams, bucketSvc , egGridDataProvider) { }]) .controller('ViewCtrl', - ['$scope','$q','$routeParams','bucketSvc', -function($scope, $q , $routeParams, bucketSvc) { + ['$scope','$q','$routeParams','bucketSvc', 'egCore', '$window', + '$timeout', +function($scope, $q , $routeParams, bucketSvc, egCore, $window, + $timeout) { $scope.setTab('view'); $scope.bucketId = $routeParams.id; @@ -513,6 +515,18 @@ function($scope, $q , $routeParams, bucketSvc) { ); } + $scope.showAllRecords = function() { + // TODO: maybe show selected would be better? + // 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) { + var url = egCore.env.basePath + + 'cat/catalog/record/' + + rec.target_biblio_record_entry(); + $timeout(function() { $window.open(url, '_blank') }); + }); + } + $scope.detachRecords = function(records) { var promises = []; angular.forEach(records, function(rec) {