From: Galen Charlton Date: Wed, 8 Feb 2017 22:26:15 +0000 (-0500) Subject: webstaff: implement Update Barcodes line item action X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cacd801e4374d8fe8d044712f7cc09ef242d8123;p=working%2FEvergreen.git webstaff: implement Update Barcodes line item action Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- 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/' +