From f661516725884b0884cf9bb9691a28076374ed7c Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 16 Aug 2010 18:44:08 +0000 Subject: [PATCH] ui.circ.suppress_checkin_popups disables dialog prompts during check-in, but in the case print slip dialogs, it should still print the slips if the Auto-Print Hold and Transit Slips checkbox is toggled on (the action is still occuring). However, only the dedicated Check-In interface had such a checkbox, and if you were to check-in from Item Status or Items Out with that org unit setting active, you'd have no option to print any slips associated with the check-in. This fixes all that git-svn-id: svn://svn.open-ils.org/ILS/trunk@17229 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/copy_status.js | 9 ++++++++- Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul | 3 +++ Open-ILS/xul/staff_client/server/patron/items.js | 7 ++++++- Open-ILS/xul/staff_client/server/patron/items_overlay.xul | 3 +++ 4 files changed, 20 insertions(+), 2 deletions(-) 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 1a7bf35fb..581a60ab8 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.js +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js @@ -246,10 +246,17 @@ circ.copy_status.prototype = { function() { try { var funcs = []; + var auto_print = document.getElementById('checkin_auto_print_slips'); + if (auto_print) auto_print = auto_print.getAttribute('checked') == 'true'; JSAN.use('circ.util'); for (var i = 0; i < obj.selection_list.length; i++) { var barcode = obj.selection_list[i].barcode; - var checkin = circ.util.checkin_via_barcode( ses(), { 'barcode' : barcode } ); + var checkin = circ.util.checkin_via_barcode( + ses(), + { 'barcode' : barcode }, + false /* backdate */, + auto_print + ); funcs.push( function(a) { return function() { obj.copy_status( a, true ); }; }(barcode) ); } for (var i = 0; i < funcs.length; i++) { funcs[i](); } diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul index 9f270fe75..770400a85 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul @@ -192,6 +192,9 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js index cd26fbc07..d9a804e49 100644 --- a/Open-ILS/xul/staff_client/server/patron/items.js +++ b/Open-ILS/xul/staff_client/server/patron/items.js @@ -548,12 +548,17 @@ patron.items.prototype = { } var r = window.confirm(msg); if (!r) { return; } + var auto_print = document.getElementById('checkin_auto_print_slips'); + if (auto_print) auto_print = auto_print.getAttribute('checked') == 'true'; JSAN.use('circ.util'); for (var i = 0; i < retrieve_ids.length; i++) { var copy_id = retrieve_ids[i].copy_id; dump('Check in copy_id = ' + copy_id + ' barcode = ' + retrieve_ids[i].barcode + '\n'); var robj = circ.util.checkin_via_barcode( - ses(), { 'copy_id' : copy_id } + ses(), + { 'copy_id' : copy_id }, + false /* backdate */, + auto_print ); /* circ.util.checkin_via_barcode handles errors currently */ } diff --git a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul index 78f9ce3a9..f38ce03cf 100644 --- a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul @@ -180,6 +180,9 @@