From a50db91d78aae9eed32a16bc2d7e8a357c3afae9 Mon Sep 17 00:00:00 2001 From: Adam Bowling Date: Tue, 19 Oct 2021 16:59:11 -0400 Subject: [PATCH] LP#1845556: Spine Label Enhanced Printing Fix Removes the typo of "/i" at the start of the file and removes the cp_full pulled from ccbi, which was a legacy holdover that doesn't work with most staff user permission groups. Signed-off-by: Adam Bowling Signed-off-by: Terran McCanna --- .../web/js/ui/default/staff/cat/bucket/copy/app.js | 32 ++++++---------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js index bf9df62bb9..d111ea4985 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js @@ -1,4 +1,4 @@ -/i** +** * Copy Buckets * * Known Issues @@ -606,35 +606,19 @@ function($scope, $q , $routeParams , $timeout , $window , $uibModal , bucketSvc angular.forEach($scope.gridControls.selectedItems(), function (i) { cp_list.push(i.id); }) - var cp_full = [], promises = []; - promises.push( - egCore.pcrud.search('ccbi', { bucket: bucketSvc.currentBucket.a[2], "target_copy": { "in": cp_list } }).then( - null, - null, - function (ccbi) { - cp_full.push(egCore.idl.toHash(ccbi, true)); - } - ) - ); egCore.net.request( 'open-ils.actor', 'open-ils.actor.anon_cache.set_value', null, 'print-labels-these-copies', { - copies : cp_full + copies : cp_list } ).then(function(key) { - $q.all(promises).then(function () { - if (cp_full.length > 0) { - if (key) { - var url = egCore.env.basePath + 'cat/printlabels/' + key; - $timeout(function() { $window.open(url, '_blank') }); - } else { - alert('Could not create anonymous cache key!'); - } - } else { - alert('Could not print label export'); - } - }); + if (key) { + var url = egCore.env.basePath + 'cat/printlabels/' + key; + $timeout(function() { $window.open(url, '_blank') }); + } else { + alert('Could not create anonymous cache key!'); + } }); } -- 2.11.0