From cacd801e4374d8fe8d044712f7cc09ef242d8123 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Feb 2017 17:26:15 -0500 Subject: [PATCH] webstaff: implement Update Barcodes line item action Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/acq/app.js | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/acq/app.js b/Open-ILS/web/js/ui/default/staff/acq/app.js index 431ab4dc6c..6f302e8d35 100644 --- a/Open-ILS/web/js/ui/default/staff/acq/app.js +++ b/Open-ILS/web/js/ui/default/staff/acq/app.js @@ -46,9 +46,31 @@ function($scope , $routeParams , $location , $window , $timeout , egCore) { } } + // minimal version sufficient to update copy barcodes + var volume_item_creator = function(params) { + egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.anon_cache.set_value', + null, 'edit-these-copies', { + copies: params.existing_copies.map(function(acp) { return acp.id(); }), + raw: [], + hide_vols : false, + hide_copies : false + } + ).then(function(key) { + if (key) { + var url = egCore.env.basePath + 'cat/volcopy/' + key; + $timeout(function() { $window.open(url, '_blank') }); + } else { + alert('Could not create anonymous cache key!'); + } + }); + } + $scope.funcs = { ses : egCore.auth.token(), - relay_url : relay_url + relay_url : relay_url, + volume_item_creator : volume_item_creator } var acq_path = '/eg/acq/' + -- 2.43.2