From 7550437636b3ff3b7e5761e55c48d485159bb169 Mon Sep 17 00:00:00 2001 From: phasefx Date: Sun, 11 Dec 2005 19:56:23 +0000 Subject: [PATCH] patron.display sets it up so that circ.checkout can talk to patron.summary git-svn-id: svn://svn.open-ils.org/ILS/trunk@2340 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/evergreen/util/deck.js | 6 ++++-- Open-ILS/xul/staff_client/server/patron/display.js | 9 +++++---- Open-ILS/xul/staff_client/server/patron/summary.xul | 1 - 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js b/Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js index aa99bc32ec..afa5b6fed0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js +++ b/Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js @@ -36,8 +36,9 @@ util.deck.prototype = { var idx = this.find_index(url); if (idx>-1) { this.node.selectedIndex = idx; + return this.node.childNodes[idx]; } else { - this.new_iframe(url,params,content_params); + return this.new_iframe(url,params,content_params); } @@ -45,7 +46,7 @@ util.deck.prototype = { 'reset_iframe' : function (url,params,content_params) { this.remove_iframe(url); - this.new_iframe(url,params,content_params); + return this.new_iframe(url,params,content_params); }, 'new_iframe' : function (url,params,content_params) { @@ -67,6 +68,7 @@ util.deck.prototype = { dump('E: ' + E + '\n'); } } + return iframe; }, 'remove_iframe' : function (url) { diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 86ce6edd6c..ebf47cf899 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -52,10 +52,10 @@ patron.display.prototype = { {}, { 'on_checkout' : function(checkout) { - var c = obj.patron.checkouts(); + var c = obj.summary_window.g.summary.patron.checkouts(); c.push( checkout ); - obj.patron.checkouts( c ); - obj.controller.render('patron_checkouts'); + obj.summary_window.g.summary.patron.checkouts( c ); + obj.summary_window.g.summary.controller.render('patron_checkouts'); } } ); @@ -119,7 +119,7 @@ patron.display.prototype = { ); if (obj.barcode) { - obj.left_deck.set_iframe( + var frame = obj.left_deck.set_iframe( urls.remote_patron_summary +'?session=' + window.escape(obj.session) +'&barcode=' + window.escape(obj.barcode), @@ -130,6 +130,7 @@ patron.display.prototype = { } } ); + obj.summary_window = frame.contentWindow; } }, } diff --git a/Open-ILS/xul/staff_client/server/patron/summary.xul b/Open-ILS/xul/staff_client/server/patron/summary.xul index 5e4b402a56..6e324a32ad 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary.xul @@ -42,7 +42,6 @@ JSAN.use('patron.summary'); g.summary = new patron.summary(); g.summary.init( { 'barcode' : g.cgi.param('barcode') , 'session' : g.cgi.param('session') } ); - } catch(E) { var err_msg = "!! This software has encountered an error. Please tell your friendly " + "system administrator or software developer the following:\n" + E + '\n'; -- 2.43.2