From d3a2aa9530c95276692787c430fab54cc28a180a Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 1 Feb 2006 15:41:39 +0000 Subject: [PATCH] bug fix git-svn-id: svn://svn.open-ils.org/ILS/trunk@2916 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/chrome/content/legacy/_browse.xul | 7 ++++++- Open-ILS/xul/staff_client/server/patron/bills.js | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul b/Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul index a93c8ef11a..73593bfdf9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul +++ b/Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul @@ -356,6 +356,8 @@ var title = list.length == 1 ? 'Copy' : 'Copies'; JSAN.use('util.window'); var win = new util.window(); + g.data.temp = ''; + g.data.stash('temp'); var w = win.open( window.xulG.url_prefix(urls.XUL_COPY_EDITOR) +'?session='+window.escape(g.session) @@ -368,7 +370,7 @@ g.data.stash_retrieve(); var copies = JSON2js( g.data.temp ); g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp); - if (edit=='1') { + if (edit=='1' && copies!='') { try { var r = g.network.request( api.FM_ACP_FLESHED_BATCH_UPDATE.app, @@ -426,6 +428,8 @@ var title = list.length == 1 ? 'Volume' : 'Volumes'; JSAN.use('util.window'); var win = new util.window(); + g.data.temp = ''; + g.data.stash('temp'); var w = win.open( window.xulG.url_prefix(urls.XUL_VOLUME_EDITOR) +'?session='+window.escape(g.session) @@ -438,6 +442,7 @@ g.data.stash_retrieve(); var volumes = JSON2js( g.data.temp ); g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp); + if (volumes=='') return; volumes = util.functional.filter_list( volumes, diff --git a/Open-ILS/xul/staff_client/server/patron/bills.js b/Open-ILS/xul/staff_client/server/patron/bills.js index d91dd68892..74a96b8652 100644 --- a/Open-ILS/xul/staff_client/server/patron/bills.js +++ b/Open-ILS/xul/staff_client/server/patron/bills.js @@ -235,6 +235,8 @@ patron.bills.prototype = { var win = new util.window(); switch(obj.controller.view.payment_type.value) { case 'credit_card_payment' : + obj.OpenILS.data.temp = ''; + obj.OpenILS.data.stash('temp'); var w = win.open( urls.XUL_PATRON_BILL_CC_INFO, 'billccinfo', @@ -245,6 +247,8 @@ patron.bills.prototype = { payment_blob = JSON2js( obj.OpenILS.data.temp ); break; case 'check_payment' : + obj.OpenILS.data.temp = ''; + obj.OpenILS.data.stash('temp'); var w = win.open( urls.XUL_PATRON_BILL_CHECK_INFO, 'billcheckinfo', @@ -255,7 +259,7 @@ patron.bills.prototype = { payment_blob = JSON2js( obj.OpenILS.data.temp ); break; } - if (payment_blob.cancelled == 'true') { alert('cancelled'); return; } + if (payment_blob=='' || payment_blob.cancelled=='true') { alert('cancelled'); return; } payment_blob.userid = obj.patron_id; payment_blob.note = payment_blob.note || ''; payment_blob.cash_drawer = 1; // FIXME: get new Config() to work -- 2.43.2