Lines 17-37
Link Here
|
17 |
<script type="text/javascript"> |
17 |
<script type="text/javascript"> |
18 |
//<![CDATA[ |
18 |
//<![CDATA[ |
19 |
var ALERT_SUCCESSFUL_CHECKIN = _("Checked in item."); |
19 |
var ALERT_SUCCESSFUL_CHECKIN = _("Checked in item."); |
20 |
var ALERT_MATERIALS = _("Note about the accompanying materials: "); |
20 |
var ALERT_MATERIALS = _("Note about the accompanying materials: %s"); |
21 |
var ALERT_RESTRICTED = _("Patron is RESTRICTED"); |
21 |
var ALERT_RESTRICTED = _("Patron is RESTRICTED"); |
22 |
var ALERT_NO_MATCHING_ITEM = _("No item with barcode in offline database (transaction recorded anyway): "); |
22 |
var ALERT_NO_MATCHING_ITEM = _("No item with barcode in offline database (transaction recorded anyway): %s"); |
23 |
var ALERT_NOT_CHECKED_OUT = _("Item not listed as checked out in offline database (transaction recorded anyway)"); |
23 |
var ALERT_NOT_CHECKED_OUT = _("Item not listed as checked out in offline database (transaction recorded anyway)"); |
24 |
var ALERT_ITEM_WITHDRAWN = _("Item has been withdrawn (transaction recorded anyway)"); |
24 |
var ALERT_ITEM_WITHDRAWN = _("Item has been withdrawn (transaction recorded anyway)"); |
25 |
var ALERT_ITEM_RESTRICTED = _("Item is restricted (transaction recorded anyway)"); |
25 |
var ALERT_ITEM_RESTRICTED = _("Item is restricted (transaction recorded anyway)"); |
26 |
var ALERT_ITEM_LOST = _("Item has been lost (transaction recorded anyway)"); |
26 |
var ALERT_ITEM_LOST = _("Item has been lost (transaction recorded anyway)"); |
27 |
var ALERT_NO_MATCHING_PATRON = _("No patron cardnumber in offline database (proceeding anyway): "); |
27 |
var ALERT_NO_MATCHING_PATRON = _("No patron cardnumber in offline database (proceeding anyway): %s"); |
28 |
var ALERT_PATRON_GONE_NO_ADDRESS = _("Patron's address is in doubt (proceeding anyway)"); |
28 |
var ALERT_PATRON_GONE_NO_ADDRESS = _("Patron's address is in doubt (proceeding anyway)"); |
29 |
var ALERT_PATRON_CARD_LOST = _("Patron's card is lost"); |
29 |
var ALERT_PATRON_CARD_LOST = _("Patron's card is lost"); |
30 |
var ALERT_PATRON_EXPIRED = _("Patron's card is expired"); |
30 |
var ALERT_PATRON_EXPIRED = _("Patron's card is expired (%s)"); |
31 |
var ALERT_PATRON_BLOCKED_TEMPORARY = _("Patron has had overdue items and is restricted until: "); |
31 |
var ALERT_PATRON_BLOCKED_TEMPORARY = _("Patron has had overdue items and is restricted until: %s"); |
32 |
var ALERT_PATRON_RESTRICTED = _("Patron is restricted"); |
32 |
var ALERT_PATRON_RESTRICTED = _("Patron is restricted"); |
33 |
var ALERT_PATRON_FINE = _("Patron has outstanding fines: "); |
33 |
var ALERT_PATRON_FINE = _("Patron has outstanding fines: %s"); |
34 |
var ALERT_PATRON_FINE_OVER_LIMIT = _("Patron fines are over limit: "); |
34 |
var ALERT_PATRON_FINE_OVER_LIMIT = _("Patron fines are over limit: %s"); |
35 |
var UPLOAD_PENDING_MESSAGE = _("You have transactions in the offline circulation database on this computer that have not been uploaded."); |
35 |
var UPLOAD_PENDING_MESSAGE = _("You have transactions in the offline circulation database on this computer that have not been uploaded."); |
36 |
var NO_UPLOAD_PENDING_MESSAGE = _("You do not have any pending transactions in the offline circulation database on this computer."); |
36 |
var NO_UPLOAD_PENDING_MESSAGE = _("You do not have any pending transactions in the offline circulation database on this computer."); |
37 |
|
37 |
|
Lines 79-88
function checkin(barcode, item, error) {
Link Here
|
79 |
function checkAlerts(barcode, item) { |
79 |
function checkAlerts(barcode, item) { |
80 |
var alerts = []; |
80 |
var alerts = []; |
81 |
if (typeof item === 'undefined') { |
81 |
if (typeof item === 'undefined') { |
82 |
alerts.push(ALERT_NO_MATCHING_ITEM + barcode); |
82 |
alerts.push(ALERT_NO_MATCHING_ITEM.format(barcode)); |
83 |
} else { |
83 |
} else { |
84 |
if (typeof item.materials !== 'undefined' && item.materials != null) { |
84 |
if (typeof item.materials !== 'undefined' && item.materials != null) { |
85 |
alerts.push(ALERT_MATERIALS + item.materials); |
85 |
alerts.push(ALERT_MATERIALS.format(item.materials)); |
86 |
} |
86 |
} |
87 |
} |
87 |
} |
88 |
return alerts; |
88 |
return alerts; |
Lines 321-327
function recordFine(amount) {
Link Here
|
321 |
function checkPatronAlerts(cardnumber, patron) { |
321 |
function checkPatronAlerts(cardnumber, patron) { |
322 |
var alerts = []; |
322 |
var alerts = []; |
323 |
if (typeof patron === 'undefined') { |
323 |
if (typeof patron === 'undefined') { |
324 |
alerts.push(ALERT_NO_MATCHING_PATRON + cardnumber); |
324 |
alerts.push(ALERT_NO_MATCHING_PATRON.format(cardnumber)); |
325 |
} else { |
325 |
} else { |
326 |
if (patron.gonenoaddress !== '0') { |
326 |
if (patron.gonenoaddress !== '0') { |
327 |
alerts.push(ALERT_PATRON_GONE_NO_ADDRESS); |
327 |
alerts.push(ALERT_PATRON_GONE_NO_ADDRESS); |
Lines 331-348
function checkPatronAlerts(cardnumber, patron) {
Link Here
|
331 |
} |
331 |
} |
332 |
if (patron.debarred !== null) { |
332 |
if (patron.debarred !== null) { |
333 |
if (patron.debarred != '9999-12-31') { |
333 |
if (patron.debarred != '9999-12-31') { |
334 |
alerts.push(ALERT_PATRON_BLOCKED_TEMPORARY + $.datepicker.formatDate(dateformat, new Date(patron.debarred))); |
334 |
alerts.push(ALERT_PATRON_BLOCKED_TEMPORARY.format($.datepicker.formatDate(dateformat, new Date(patron.debarred)))); |
335 |
} else { |
335 |
} else { |
336 |
alerts.push(ALERT_PATRON_RESTRICTED); |
336 |
alerts.push(ALERT_PATRON_RESTRICTED); |
337 |
} |
337 |
} |
338 |
} |
338 |
} |
339 |
if (new Date(patron.dateexpiry) < new Date()) { |
339 |
if (new Date(patron.dateexpiry) < new Date()) { |
340 |
alerts.push(ALERT_PATRON_EXPIRED + ' (' + $.datepicker.formatDate(dateformat, new Date(patron.dateexpiry)) + ')'); |
340 |
alerts.push(ALERT_PATRON_EXPIRED.format($.datepicker.formatDate(dateformat, new Date(patron.dateexpiry)))); |
341 |
} |
341 |
} |
342 |
if (parseInt(patron.fine) > [% maxoutstanding %]) { |
342 |
if (parseInt(patron.fine) > [% maxoutstanding %]) { |
343 |
alerts.push(ALERT_PATRON_FINE_OVER_LIMIT + patron.fine); |
343 |
alerts.push(ALERT_PATRON_FINE_OVER_LIMIT.format(patron.fine)); |
344 |
} else if (parseInt(patron.fine) > 0) { |
344 |
} else if (parseInt(patron.fine) > 0) { |
345 |
alerts.push(ALERT_PATRON_FINE + patron.fine); |
345 |
alerts.push(ALERT_PATRON_FINE.format(patron.fine)); |
346 |
} |
346 |
} |
347 |
} |
347 |
} |
348 |
return alerts; |
348 |
return alerts; |