From 9da41502478405f656996ee9fe69ec53ce2e52a5 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 23 Feb 2009 22:56:49 +0000 Subject: [PATCH] pass the patron barcode into the opac when embedded in the patron display, and use the remote xul opac wrapper for now to get around a security bump git-svn-id: svn://svn.open-ils.org/ILS/trunk@12276 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/main/constants.js | 2 +- Open-ILS/xul/staff_client/server/patron/display.js | 43 ++++++++++++---------- Open-ILS/xul/staff_client/server/patron/holds.js | 5 ++- Open-ILS/xul/staff_client/server/patron/holds.xul | 1 + 4 files changed, 29 insertions(+), 22 deletions(-) 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 795f27c91e..20e1e92ae2 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -285,7 +285,7 @@ const urls = { 'XUL_OFFLINE_MANAGE_XACTS' : '/xul/server/admin/offline_manage_xacts.xul', 'XUL_OFFLINE_MANAGE_XACTS_CGI' : '/cgi-bin/offline/offline.pl', 'XUL_OFFLINE_GENERATE_WIDGETS' : '/xul/server/main/gen_offline_widgets.xul', - /* 'XUL_OPAC_WRAPPER' : '/xul/server/cat/opac.xul', */ + 'XUL_REMOTE_OPAC_WRAPPER' : '/xul/server/cat/opac.xul', 'XUL_OPAC_WRAPPER' : 'chrome://open_ils_staff_client/content/cat/opac.xul', 'XUL_PATRON_BARCODE_ENTRY' : '/xul/server/patron/barcode_entry.xul', 'XUL_PATRON_BILLS' : '/xul/server/patron/bills.xul', diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index fb9b84bfa8..249c807603 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -307,25 +307,30 @@ patron.display.prototype = { 'cmd_patron_holds' : [ ['command'], function(ev) { - try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_holds" ) ); } catch(E) {}; - obj.reset_nav_styling('cmd_patron_holds'); - obj.right_deck.set_iframe( - urls.XUL_PATRON_HOLDS, - //+ '?patron_id=' + window.escape( obj.patron.id() ), - {}, - { - 'display_window' : window, - 'patron_id' : obj.patron.id(), - 'on_list_change' : function(h) { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - //obj.summary_window.g.summary.controller.render('patron_holds'); - //obj.summary_window.g.summary.controller.render('patron_standing_penalties'); - obj.refresh_all(); - }, - 'url_prefix' : xulG.url_prefix, - 'new_tab' : xulG.new_tab - } - ); + try { + try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_holds" ) ); } catch(E) {}; + obj.reset_nav_styling('cmd_patron_holds'); + obj.right_deck.set_iframe( + urls.XUL_PATRON_HOLDS, + //+ '?patron_id=' + window.escape( obj.patron.id() ), + {}, + { + 'display_window' : window, + 'patron_id' : obj.patron.id(), + 'patron_barcode' : obj.patron.card().barcode(), + 'on_list_change' : function(h) { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + //obj.summary_window.g.summary.controller.render('patron_holds'); + //obj.summary_window.g.summary.controller.render('patron_standing_penalties'); + obj.refresh_all(); + }, + 'url_prefix' : xulG.url_prefix, + 'new_tab' : xulG.new_tab + } + ); + } catch(E) { + alert(E); + } } ], 'cmd_patron_bills' : [ diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 73301326f9..55f3780bdc 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -35,6 +35,7 @@ patron.holds.prototype = { var obj = this; obj.patron_id = params['patron_id']; + obj.patron_barcode = params['patron_barcode']; obj.docid = params['docid']; obj.shelf = params['shelf']; obj.tree_id = params['tree_id']; @@ -905,7 +906,7 @@ patron.holds.prototype = { 'cmd_search_opac' : [ ['command'], function(ev) { - var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'patron_id' : obj.patron_id }; + var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'patron_barcode' : obj.patron_barcode }; content_params.new_tab = xulG.new_tab; content_params.set_tab = xulG.set_tab; content_params.set_tab_name = xulG.set_tab_name; @@ -913,7 +914,7 @@ patron.holds.prototype = { content_params.url_prefix = xulG.url_prefix; content_params.network_meter = xulG.network_meter; content_params.chrome_xulG = xulG.chrome_xulG; - xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_OPAC_WRAPPER, {}, content_params); + xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_REMOTE_OPAC_WRAPPER, {}, content_params); } ] } diff --git a/Open-ILS/xul/staff_client/server/patron/holds.xul b/Open-ILS/xul/staff_client/server/patron/holds.xul index f449a65a6d..65f3e241ed 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds.xul @@ -49,6 +49,7 @@ g.holds.init( { 'patron_id' : xul_param('patron_id'), + 'patron_barcode' : xul_param('patron_barcode'), 'docid' : xul_param('docid'), 'shelf' : xul_param('shelf'), 'pull' : xul_param('pull'), -- 2.11.0