From: Cesar Velez Date: Tue, 1 Aug 2017 21:42:00 +0000 (+0100) Subject: LP#1685929: add implementation print spine labels to checkin grid X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=91771c5f535892f909ab0bf30bd4a15fe1338f6f;p=working%2FEvergreen.git LP#1685929: add implementation print spine labels to checkin grid Signed-off by: Cesar Velez Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index e3bf69aded..7f86eb3ebb 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -374,5 +374,9 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg itemSvc.mark_missing_pieces(i.acp); }); } + + $scope.printSpineLabels = function(items){ + itemSvc.print_spine_labels(items); + } }]) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js index 3c0953f5bd..278e43327f 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js @@ -887,5 +887,22 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog }); } + service.print_spine_labels = function(copies){ + egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.anon_cache.set_value', + null, 'print-labels-these-copies', { + copies : service.gatherSelectedHoldingsIds(copies) + } + ).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!'); + } + }); + } + return service; }])