From 094df4aefd4f68249d34e62427d9361ddc8ce2e1 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 2 Sep 2010 23:57:51 +0000 Subject: [PATCH] wire up the alternate print approach for full pull lists git-svn-id: svn://svn.open-ils.org/ILS/trunk@17464 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ .../staff_client/chrome/content/main/constants.js | 1 + Open-ILS/xul/staff_client/server/patron/holds.js | 28 +++++++++++++++++++++- .../staff_client/server/patron/holds_overlay.xul | 2 ++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 8a1cf560d..fd1cbf786 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2977,6 +2977,8 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 870731058..b30fc1316 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -129,6 +129,7 @@ var api = { 'FM_AHR_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.retrieve' }, 'FM_AHR_PULL_LIST_COUNT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.retrieve.count' }, 'FM_AHR_ID_LIST_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.id_list.retrieve', 'secure' : false }, + 'HTML_HOLD_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.print' }, 'FM_AHR_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.on_shelf.retrieve' }, 'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve', 'secure' : false }, 'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve', 'secure' : false }, diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index df531b958..a0969e3da 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -289,7 +289,31 @@ patron.holds.prototype = { ); } ], - + 'cmd_holds_print_full' : [ + ['command'], + function() { + var x_print_full_pull_list = document.getElementById('print_full_btn'); + try { + if (progressmeter) { + progressmeter.mode = 'undetermined'; + progressmeter.hidden = false; + x_print_full_pull_list.disabled = true; + } + JSAN.use('util.print'); + var print = new util.print('default'); + var robj = obj.network.simple_request('HTML_HOLD_PULL_LIST',[ses()]); + if (typeof robj.ilsevent != 'undefined') { throw(robj); } + print.simple( robj.template_output().data() ); + } catch(E) { + obj.error.standard_unexpected_error_alert('cmd_holds_print_full',E); + } + if (progressmeter) { + progressmeter.mode = 'determined'; + progressmeter.hidden = true; + x_print_full_pull_list.disabled = false; + } + } + ], 'cmd_holds_print' : [ ['command'], function() { @@ -1259,6 +1283,7 @@ patron.holds.prototype = { var x_show_cancelled_deck = document.getElementById('show_cancelled_deck'); var x_clear_shelf_widgets = document.getElementById('clear_shelf_widgets'); var x_expired_checkbox = document.getElementById('expired_checkbox'); + var x_print_full_pull_list = document.getElementById('print_full_btn'); switch(obj.hold_interface_type) { case 'shelf': obj.render_lib_menus({'pickup_lib':true}); @@ -1269,6 +1294,7 @@ patron.holds.prototype = { break; case 'pull' : if (x_fetch_more) x_fetch_more.hidden = false; + if (x_print_full_pull_list) x_print_full_pull_list.hidden = false; if (x_lib_type_menu) x_lib_type_menu.hidden = true; if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = true; break; diff --git a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul index e0f3ee090..106501cf9 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul @@ -18,6 +18,7 @@ + @@ -186,6 +187,7 @@