label="[% l('Triggered Events') %]"></eg-grid-action>
<eg-grid-action handler="selectedHoldingsItemStatusHolds" group="[% l('Show') %]"
label="[% l('Item Holds') %]"></eg-grid-action>
+ <eg-grid-action handler="selectedHoldingsPrintLabels" group="[% l('Show') %]"
+ label="[% l('Print Labels') %]"></eg-grid-action>
<eg-grid-action handler="selectedHoldingsDamaged" group="[% l('Mark') %]"
label="[% l('Item as Damaged') %]"></eg-grid-action>
);
}
+ $scope.selectedHoldingsPrintLabels = function() {
+ egCore.net.request(
+ 'open-ils.actor',
+ 'open-ils.actor.anon_cache.set_value',
+ null, 'print-labels-these-copies', {
+ copies : gatherSelectedHoldingsIds()
+ }
+ ).then(function(key) {
+ if (key) {
+ var url = egCore.env.basePath + 'cat/printlabels/' + key;
+ $timeout(function() { $window.open(url, '_blank') });
+ } else {
+ alert('Could not create anonymous cache key!');
+ }
+ });
+ }
+
$scope.selectedHoldingsDamaged = function () {
egCirc.mark_damaged(gatherSelectedHoldingsIds()).then(function() {
holdingsSvcInst.fetchAgain().then(function() {