From 1f7816632a2c7e3ed0bd0ad42a0d2210c1e153cf Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 12 Apr 2006 04:29:56 +0000 Subject: [PATCH] more annoying alerts git-svn-id: svn://svn.open-ils.org/ILS/trunk@3675 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/checkin.js | 3 +-- Open-ILS/xul/staff_client/server/circ/checkout.js | 3 +-- Open-ILS/xul/staff_client/server/circ/copy_status.js | 3 +-- Open-ILS/xul/staff_client/server/circ/in_house_use.js | 11 ++++++++--- Open-ILS/xul/staff_client/server/circ/util.js | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index 120ea69bae..f7e5503f86 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -175,8 +175,7 @@ circ.checkin.prototype = { } } catch(E) { - alert('FIXME: need special alert and error handling\n' - + js2JSON(E)); + obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + js2JSON(E), 'Check In Failed', 'Ok', null, null, 'Check here to confirm this message' ); if (typeof obj.on_failure == 'function') { obj.on_failure(E); } diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index cf3e0081b9..a9016ea6e8 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -303,8 +303,7 @@ circ.checkout.prototype = { } } catch(E) { - alert('FIXME: need special alert and error handling\n' - + js2JSON(E)); + obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + js2JSON(E), 'Check Out Failed', 'Ok', null, null, 'Check here to confirm this message' ); if (typeof obj.on_failure == 'function') { obj.on_failure(E); } diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js index 15c3502558..a8eb9c48c0 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.js +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js @@ -209,8 +209,7 @@ circ.copy_status.prototype = { obj.controller.view.copy_status_barcode_entry_textbox.value = ''; obj.controller.view.copy_status_barcode_entry_textbox.focus(); } catch(E) { - alert('FIXME: need special alert and error handling\n' - + js2JSON(E)); + obj.error.yns_alert('FIXME: If you see this message, please inform your friendly Evergreen developers\n' + js2JSON(E), 'FIXME', 'Ok', null, null, 'Check here to confirm this message'); obj.controller.view.copy_status_barcode_entry_textbox.select(); obj.controller.view.copy_status_barcode_entry_textbox.focus(); } 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 4916b3b9b1..b1fbd4a84e 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 @@ -138,7 +138,13 @@ circ.in_house_use.prototype = { JSAN.use('circ.util'); var copy = obj.network.simple_request('FM_ACP_RETRIEVE_VIA_BARCODE',[ barcode ]); - if (copy.ilsevent) { alert(copy.textcode); return; } + if (copy.ilsevent) { + switch(copy.ilsevent) { + case 1502: obj.error.yns_alert(copy.textcode,'In House Use Failed','Ok',null,null,'Check here to confirm this message'); break; + default: obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + js2JSON(copy), 'In House Use Failed', 'Ok', null, null, 'Check here to confirm this message' ); break; + } + return; + } var mods = obj.network.simple_request('MODS_SLIM_RECORD_RETRIEVE_VIA_COPY',[ copy.id() ]); var result = obj.network.simple_request('FM_AIHU_CREATE', @@ -168,8 +174,7 @@ circ.in_house_use.prototype = { } } catch(E) { - alert('FIXME: need special alert and error handling\n' - + js2JSON(E)); + obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + js2JSON(E), 'In House Use Failed', 'Ok', null, null, 'Check here to confirm this message' ); if (typeof obj.on_failure == 'function') { obj.on_failure(E); } diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 3704720e1f..59e4ecf94f 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -523,7 +523,7 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { JSAN.use('util.error'); var error = new util.error(); var msg = E + '\n---\n' + js2JSON(E); error.sdump('D_ERROR',msg); - alert(msg); + obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + (msg), 'Check In Failed', 'Ok', null, null, 'Check here to confirm this message' ); return null; } } @@ -554,7 +554,7 @@ circ.util.hold_capture_via_copy_barcode = function ( session, barcode, retrieve_ JSAN.use('util.error'); var error = new util.error(); var msg = E + '\n---\n' + js2JSON(E); error.sdump('D_ERROR',msg); - alert(msg); + obj.error.yns_alert('FIXME: If you see this alert, please let your friendly Evergreen Developers know.\n' + (msg), 'Check In Failed', 'Ok', null, null, 'Check here to confirm this message' ); return null; } } -- 2.43.2