From 8c6632570bd0da2b06bb4c47e39b99a6f1c79d5f Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 22 Dec 2009 12:10:03 +0000 Subject: [PATCH] wire up Show in Catalog action for bills interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@15219 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/bill2.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 1b73e3683a..f5e36e3078 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -88,6 +88,12 @@ function event_listeners() { false ); + $('opac').addEventListener( + 'command', + handle_opac, + false + ); + $('payment').addEventListener( 'change', function(ev) { @@ -435,6 +441,7 @@ function init_lists() { $('details').setAttribute('disabled', g.bill_list_selection.length == 0); $('add').setAttribute('disabled', g.bill_list_selection.length == 0); $('voidall').setAttribute('disabled', g.bill_list_selection.length == 0); + $('opac').setAttribute('disabled', g.bill_list_selection.length == 0); }, 'on_click' : function(ev) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead'); @@ -584,6 +591,22 @@ function handle_void_all() { } } +function handle_opac() { + try { + var ids = []; + for (var i = 0; i < g.bill_list_selection.length; i++) { + var my_mvr = g.bill_map[ g.bill_list_selection[i] ].record; + var my_acp = g.bill_map[ g.bill_list_selection[i] ].copy; + if (typeof my_mvr != 'undefined' && my_mvr != null) { + ids.push( { 'barcode' : my_acp.barcode(), 'doc_id' : my_mvr.doc_id() } ); + } + } + JSAN.use('cat.util'); + cat.util.show_in_opac( ids ); + } catch(E) { + alert('Error in bill2.js, handle_opac: ' + E); + } +} function handle_details() { JSAN.use('util.window'); var win = new util.window(); -- 2.11.0