From fc27580f34c7e074edcb0fc50fe75d1700bfbb6b Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 27 Jun 2006 04:00:28 +0000 Subject: [PATCH] fixes git-svn-id: svn://svn.open-ils.org/ILS/trunk@4797 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 4 ++-- Open-ILS/xul/staff_client/server/cat/util.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 0594b41f57..542193c4a0 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -26,9 +26,9 @@ function my_init() { var copy_ids = []; if (g.cgi.param('copy_ids')) copy_ids = JSON2js( g.cgi.param('copy_ids') ); - if (!copy_ids) copy_ids = []; if (window.xulG && window.xulG.copy_ids) copy_ids = copy_ids.concat( window.xulG.copy_ids ); if (g.data.temp_copy_ids != 'undefined') copy_ids = copy_ids.concat( JSON2js( g.data.temp_copy_ids ) ); + if (!copy_ids) copy_ids = []; if (copy_ids.length > 0) g.copies = g.network.request( api.FM_ACP_FLESHED_BATCH_RETRIEVE.app, @@ -42,7 +42,7 @@ function my_init() { if (!g.copies) g.copies = []; if (window.xulG && window.xulG.copies) g.copies = g.copies.concat( window.xulG.copies ); if (g.cgi.param('copies')) g.copies = g.copies.concat( JSON2js( g.cgi.param('copies') ) ); - if (g.data.temp_copies != 'undefined') g.copies = g.copies.concat( JSON2js( g.data.temp_copies ) ); + if (g.data.temp_copies != 'undefined' && g.data.temp_copies) g.copies = g.copies.concat( JSON2js( g.data.temp_copies ) ); /******************************************************************************************************/ /* We try to retrieve callnumbers for existing copies, but for new copies, we rely on this */ diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index ac93c53ad2..3a974ca5b7 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -90,17 +90,17 @@ cat.util.spawn_copy_editor = function(list,edit) { obj.data.stash('temp_copy_ids'); var w = win.open( window.xulG.url_prefix(urls.XUL_COPY_EDITOR) - +'?copy_ids='+window.escape(js2JSON(list)) - +'&edit='+edit, + +'?edit='+edit, title, 'chrome,modal,resizable' ); /* FIXME -- need to unique the temp space, and not rely on modalness of window */ obj.data.stash_retrieve(); - obj.data.temp_copy_ids = null; obj.data.stash('temp_copy_ids'); + if (!obj.data.temp_copies) return; var copies = JSON2js( obj.data.temp_copies ); obj.data.temp_copies = null; obj.data.stash('temp_copies'); obj.data.temp_callnumbers = null; obj.data.stash('temp_callnumbers'); + obj.data.temp_copy_ids = null; obj.data.stash('temp_copy_ids'); obj.error.sdump('D_CAT','in cat/copy_status, copy editor, copies =\n<<' + copies + '>>'); if (edit=='1' && copies!='' && typeof copies != 'undefined') { try { -- 2.11.0