From c0d38352beda1142d7f1bcff5c6e5bd78ce24093 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 Signed-off-by: Mike Rylander --- .../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 ad5e9ad36a..4b7737c866 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -3197,6 +3197,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"] @@ -3211,6 +3213,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 a7a1619aad..e1d20338f4 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/Part + 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 724e4e7568..65199ab7dd 100644 --- a/Open-ILS/web/opac/extras/circ/alt_holds_print.js +++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.js @@ -117,6 +117,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; } @@ -200,10 +203,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.43.2