print_data.item_author = payload_author;
msg += print_data.item_author_msg;
msg += '\n';
+
+ var transit_copy_status_msg; // used for receipts as well
if (check.payload.transit) {
// by adding this here, we make the data available to the
- // receipt printing engine, but since we are not appending it
- // to the 'msg', it will not display in the pre-print dialog.
+ // receipt printing engine.
print_data.transit_copy_status =
data.hash.ccs[check.payload.transit.copy_status()].name();
+
+ // See if there is a special message attached to the status
+ // of the in-transit copy. If so, append it to the alert
+ // dialog (here) and to the header of the receipt (below).
+ // The message is accessed by the ID of the copy status.
+ var cp_stat = check.payload.transit.copy_status();
+ var strings = document.getElementById('circStrings');
+ var prop =
+ 'staff.circ.utils.transit.copy_status_message.' + cp_stat;
+
+ if (strings.testString(prop)) {
+ transit_copy_status_msg = strings.getString(prop);
+ transit_copy_status_msg = // don't show literal \n's
+ transit_copy_status_msg.replace(/\\n/g, '\n');
+ msg += transit_copy_status_msg;
+ }
}
JSAN.use('util.date');
if (check.payload.hold) {
'data' : print_data,
'context' : data.print_list_templates[ template ].context,
};
+
+ if (transit_copy_status_msg) {
+ // replace newlines with <br>'s since we're now
+ // dealing with HTML
+ parms.header +=
+ transit_copy_status_msg.replace(/\n/g, '<br/>');
+ }
+
if ($('printer_prompt')) {
if (! $('printer_prompt').checked) { parms.no_prompt = true; }
}