From: Jason Stephenson Date: Wed, 23 Mar 2016 01:25:17 +0000 (-0400) Subject: LP 1507807: Show Alert dialogs in XUL staff client. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8aa0fe4c6622f6e86727311048e3b326a236e036;p=working%2FEvergreen.git LP 1507807: Show Alert dialogs in XUL staff client. If the circ.in_house_use.copy_alert org setting is true and the copy has an alert_message, then we display an alert dialog with the copy alert message when doing an in-house-use in the XUL staff client. If the circ.in_house_use.checkin_alert org setting is true and the copy location checkin_alert field is also true, then we display an alert dialog with the "item needs to be routed to..." alert message when doing an in-house-use in the XUL staff client. Signed-off-by: Jason Stephenson Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/xul/staff_client/server/circ/in_house_use.js b/Open-ILS/xul/staff_client/server/circ/in_house_use.js index 2287448b35..a6cfe94c84 100644 --- a/Open-ILS/xul/staff_client/server/circ/in_house_use.js +++ b/Open-ILS/xul/staff_client/server/circ/in_house_use.js @@ -292,6 +292,16 @@ circ.in_house_use.prototype = { [ ses(), { 'copyid' : copy.id(), 'location' : obj.data.list.au[0].ws_ou(), 'count' : multiplier } ] ); + // LP1507807: Display the copy alert if the setting is on. + if (obj.data.hash.aous['circ.in_house_use.copy_alert'] && copy.alert_message()) { + alert(copy.alert_message()); + } + + // LP1507807: Display the location alert if the setting is on. + if (obj.data.hash.aous['circ.in_house_use.checkin_alert'] && isTrue(copy.location().checkin_alert())) { + alert(document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [copy.location().name()])); + } + } else { var result = obj.network.simple_request('FM_ANCIHU_CREATE', [ ses(), { 'non_cat_type' : obj.controller.view.in_house_use_menu.value, 'location' : obj.data.list.au[0].ws_ou(), 'count' : multiplier } ]