From 514c6f2213a0160f898b0c27574c09479ea2b7b2 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 f448c0d293..d66cf952e0 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 dba013ca79..2d1ee5b6be 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 @@ -893,6 +893,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