From 77c1fa3a13d58c0850a84308d02fa058e1d3e1ba Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 28 Sep 2011 16:50:03 -0400 Subject: [PATCH] Fix a problem in the clear holds shelf list printer This is a "special" interface that you get to via Admin -> For Developers -> Local Administration in the staff client. The addition features to one "side" of this hackish interface of label affix and parts had caused breakage on the other "side." This fixes that. Also improve document printing, making it less likely the progress dialog itself gets printed. One day this will be replaced with something better. Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 8 ++++++++ Open-ILS/web/opac/extras/circ/alt_holds_print.html | 3 ++- Open-ILS/web/opac/extras/circ/alt_holds_print.js | 13 +++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index cf90688302..2a3a4e37d8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -3069,6 +3069,8 @@ sub clear_shelf_cache { first_given_name second_given_name family_name alias /], "acn" => ["label"], + "acnp" => [{column => "label", alias => "prefix"}], + "acns" => [{column => "label", alias => "suffix"}], "bre" => ["marc"], "acpl" => ["name"], "ahr" => ["id"] @@ -3083,6 +3085,12 @@ sub clear_shelf_cache { "join" => { "bre" => { "field" => "id", "fkey" => "record" + }, + "acnp" => { + "field" => "id", "fkey" => "prefix" + }, + "acns" => { + "field" => "id", "fkey" => "suffix" } } }, diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.html b/Open-ILS/web/opac/extras/circ/alt_holds_print.html index 5801df24f2..621dced315 100644 --- a/Open-ILS/web/opac/extras/circ/alt_holds_print.html +++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.html @@ -46,6 +46,7 @@ cgi.param("ses") || dojo.cookie("ses"); if (cgi.param("do") == "shelf_expired_holds") { + dojo.query("th[name=barcode_part]")[0].innerHTML = "Barcode"; /* XXX i18n. also, no support for part labels in this interface, at least for now */ dojo.byId("clear_holds_launcher").onclick = function() { if (confirm("Are you sure you're ready to clear the expired holds from the shelf?")) { /* XXX i18n */ do_clear_holds(cgi); @@ -81,7 +82,7 @@ Author Shelving Location Call Number - Barcode + Barcode/Part diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.js b/Open-ILS/web/opac/extras/circ/alt_holds_print.js index a3f0378ef7..c634b3dce1 100644 --- a/Open-ILS/web/opac/extras/circ/alt_holds_print.js +++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.js @@ -112,6 +112,9 @@ function hashify_fields(fields) { function(k) { hold.usr[k] = fields[k]; } ); + hold.current_copy.call_number.prefix = fields.prefix; + hold.current_copy.call_number.suffix = fields.suffix; + hold.current_copy.parts_stringified = ''; /* no real support for parts here */ return hold; } @@ -195,10 +198,12 @@ function do_clear_holds_from_cache(cache_key) { }, "oncomplete": function() { progress_dialog.hide(); - if (any) - window.print(); - else - alert(dojo.byId("no_results").innerHTML); + setTimeout( + function() { + if (any) window.print(); + else alert(dojo.byId("no_results").innerHTML); + }, 500 /* give the progress_dialog more time to go away */ + ); } } ); -- 2.11.0