LP#1845556: Spine Label Enhanced Printing Fix
authorAdam Bowling <abowling@emeralddata.net>
Tue, 19 Oct 2021 20:59:11 +0000 (16:59 -0400)
committerTerran McCanna <tmccanna@georgialibraries.org>
Wed, 27 Oct 2021 21:03:53 +0000 (17:03 -0400)
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 <abowling@emeralddata.net>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js

index bf9df62..d111ea4 100644 (file)
@@ -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!');
+            }
         });
     }