From 3fd202baf1e2a9c9896b530599a709040bddcf93 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Sun, 5 Mar 2017 16:07:17 -0500 Subject: [PATCH] webstaff: initial hook for label printing Signed-off-by: Jason Etheridge --- Open-ILS/src/templates/staff/cat/item/t_list.tt2 | 2 ++ Open-ILS/web/js/ui/default/staff/cat/item/app.js | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 index 9755360308..9e1762303d 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 @@ -33,6 +33,8 @@ label="[% l('Item Holds') %]"> + diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 5468daf8c3..ee47bb2d28 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -801,6 +801,23 @@ function($scope , $q , $routeParams , $location , $timeout , $window , egCore , }); } + $scope.print_labels = function() { + egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.anon_cache.set_value', + null, 'print-labels-these-copies', { + copies : gatherSelectedHoldingsIds() + } + ).then(function(key) { + if (key) { + var url = egCore.env.basePath + 'cat/printlabels/' + key; + $timeout(function() { $window.open(url, '_blank') }); + } else { + alert('Could not create anonymous cache key!'); + } + }); + } + var spawnHoldingsEdit = function (hide_vols,hide_copies){ angular.forEach(gatherSelectedRecordIds(), function (r) { egCore.net.request( -- 2.11.0