From: phasefx Date: Wed, 19 Jul 2006 20:26:29 +0000 (+0000) Subject: alert messages and hold availability notice X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a7a3858f2dc97514046170541e73d7b1753e792e;p=Evergreen.git alert messages and hold availability notice git-svn-id: svn://svn.open-ils.org/ILS/trunk@5091 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 76e3adccd2..6ae45484f7 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -318,9 +318,24 @@ patron.display.prototype = { obj._checkout_spawned = true; } - if (patron.alert_message()) { - obj.error.yns_alert('"' + patron.alert_message() + '"','Alert Message','OK',null,null,'Check here to confirm this message.'); - } + obj.network.simple_request( + 'FM_AHR_COUNT_RETRIEVE', + [ ses(), patron.id() ], + function(req) { + try { + var msg = ''; + if (patron.alert_message()) msg += patron.alert_message() + '\n'; + var holds = req.getResultObject(); + if (holds.ready && holds.ready > 0) msg += 'Holds available: ' + holds.ready; + if (msg) { + obj.error.yns_alert('"' + msg + '"','Alert Message','OK',null,null,'Check here to confirm this message.'); + } + } catch(E) { + obj.error.standard_unexpected_error_alert('Error showing patron alert and holds availability.',E); + } + } + ); + }, 'on_error' : function(E) { try {