"{{copy.barcode()}}","{{copy.location().name()}}") %]';
s.MARK_DAMAGED_CONFIRM = '[% l("Mark {{num_items}} items as DAMAGED?") %]';
s.MARK_MISSING_CONFIRM = '[% l("Mark {{num_items}} items as MISSING?") %]';
-s.MARK_ITEM_CHECKED_OUT = '[% l("Item to mark {{status}} is checked out.") %]';
-s.MARK_ITEM_IN_TRANSIT = '[% l("Item to mark {{status}} is in transit.") %]';
-s.MARK_ITEM_RESTRICT_DELETE = '[% l("Item to mark {{status}} is in a status with a copy delete warning.") %]';
-s.MARK_ITEM_LAST_HOLD_COPY = '[% l("Item to mark {{status}} is the last item to fill a hold.") %]';
-s.MARK_ITEM_CONTINUE = '[% l("Do you wish to continue?") %]';
+s.MARK_DISCARD_CONFIRM = '[% l("Mark {{num_items}} items as DICARD/WEED?") %]';
+s.MARK_ITEM_CHECKED_OUT = '[% l("Item {{barcode}} is checked out.") %]';
+s.MARK_ITEM_IN_TRANSIT = '[% l("Item {{barcode}} is in transit.") %]';
+s.MARK_ITEM_RESTRICT_DELETE = '[% l("Item {{barcode}} is in a status with a copy delete warning.") %]';
+s.MARK_ITEM_LAST_HOLD_COPY = '[% l("Item {{barcode}} is the last item to fill a hold.") %]';
+s.MARK_ITEM_CONTINUE = '[% l("Do you wish to continue marking it {{status}}?") %]';
s.ABORT_TRANSIT_CONFIRM = '[% l("Cancel {{num_transits}} transits?") %]';
s.ROUTE_TO_HOLDS_SHELF = '[% l("Holds Shelf") %]';
s.ROUTE_TO_CATALOGING = '[% l("Cataloging") %]';
});
}
- service.mark_discard = function(copy) {
- return service.mark_item(copy, 13, {});
+ service.mark_discard = function(copies) {
+ return egConfirmDialog.open(
+ egCore.strings.MARK_DISCARD_CONFIRM, '',
+ {
+ num_items : copies.length,
+ ok : function() {},
+ cancel : function() {}
+ }
+ ).then(function() {
+ var promises = [];
+ angular.forEach(copies, function(copy) {
+ promises.push(service.mark_item(copy, 13, {}))
+ });
+ });
+ return $q.all(promises);
}
service.mark_missing = function(copy_ids) {
}
service.selectedHoldingsDiscard = function (items) {
- angular.forEach(items, function(cp) {
- if (cp) {
- egCirc.mark_discard(cp).then(function(){
- service.add_barcode_to_list(cp.barcode)});
- }
+ egCirc.mark_discard(items).thef(function(){
+ angular.forEach(items, function(cp){service.add_barcode_to_list(cp.barcode)});
});
}