Make egItem.print_spine_labels() accept a list of copy
IDs and make the caller responsible for putting that list together.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
}
$scope.printSpineLabels = function(items){
- itemSvc.print_spine_labels(items);
+ var copy_ids = [];
+ angular.forEach(items, function(item) {
+ if (item.acp) copy_ids.push(item.acp.id());
+ });
+ itemSvc.print_spine_labels(copy_ids);
}
}])
});
}
- service.print_spine_labels = function(copies){
+ service.print_spine_labels = function(copy_ids){
egCore.net.request(
'open-ils.actor',
'open-ils.actor.anon_cache.set_value',
null, 'print-labels-these-copies', {
- copies : service.gatherSelectedHoldingsIds(copies)
+ copies : copy_ids
}
).then(function(key) {
if (key) {