if (g.cgi.param('copy_ids')) copy_ids = copy_ids.concat( JSON2js( g.cgi.param('copy_ids') ) );
if (typeof window.xuLG == 'object' && typeof window.xulG.copy_ids != 'undefined')
copy_ids = copy_ids.concat( window.xulG.copy_ids );
- if (g.data.temp_copy_ids != 'undefined' && g.data.temp_copy_ids != null) {
+ if (typeof g.data.temp_copy_ids != 'undefined' && g.data.temp_copy_ids != null) {
copy_ids = copy_ids.concat( JSON2js( g.data.temp_copy_ids ) );
- g.data.temp_copy_ids = null; g.data.stash('temp_copy_ids');
+ g.data.temp_copy_ids = undefined; g.data.stash('temp_copy_ids');
}
JSAN.use('cat.copy_buckets'); g.copy_buckets = new cat.copy_buckets();
if (g.cgi.param('copy_ids')) g.copy_ids = g.copy_ids.concat( JSON2js( g.cgi.param('copy_ids') ) );
if (typeof window.xuLG == 'object' && typeof window.xulG.copy_ids != 'undefined')
g.copy_ids = g.copy_ids.concat( window.xulG.copy_ids );
- if (g.data.temp_copy_ids != 'undefined' && g.data.temp_copy_ids != null) {
+ if (typeof g.data.temp_copy_ids != 'undefined' && g.data.temp_copy_ids != null) {
g.copy_ids = g.copy_ids.concat( JSON2js( g.data.temp_copy_ids ) );
- g.data.temp_copy_ids = null; g.data.stash('temp_copy_ids');
+ g.data.temp_copy_ids = undefined; g.data.stash('temp_copy_ids');
}
$('desc').appendChild( document.createTextNode(
var copy_ids = [];
if (g.cgi.param('copy_ids')) copy_ids = JSON2js( g.cgi.param('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 (typeof g.data.temp_copy_ids != 'undefined' && g.data.temp_copy_ids != null) 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(
title += ' Copy Attributes';
JSAN.use('util.window'); var win = new util.window();
- obj.data.temp = '';
- obj.data.stash('temp');
+ obj.data.temp_copies = undefined; obj.data.stash('temp_copies');
+ obj.data.temp_callnumbers = undefined; obj.data.stash('temp_callnumbers');
obj.data.temp_copy_ids = js2JSON(list);
obj.data.stash('temp_copy_ids');
var w = win.open(
obj.data.stash_retrieve();
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.data.temp_copies = undefined; obj.data.stash('temp_copies');
+ obj.data.temp_callnumbers = undefined; obj.data.stash('temp_callnumbers');
+ obj.data.temp_copy_ids = undefined; 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 {
JSAN.use('util.window'); var win = new util.window();
if (copies.length > 0) {
g.data.temp_copies = js2JSON(copies); g.data.stash('temp_copies');
+ g.data.temp_copy_ids = undefined; g.data.stash('temp_copy_ids');
g.data.temp_callnumbers = js2JSON(volume_labels); g.data.stash('temp_callnumbers');
var w = win.open(
urls.XUL_COPY_EDITOR
);
/* FIXME -- need to unique the temp space, and not rely on modalness of window */
g.data.stash_retrieve();
- g.data.temp_copy_ids = null; g.data.stash('temp_copy_ids');
copies = JSON2js( g.data.temp_copies );
- g.data.temp_copies = null; g.data.stash('temp_copies');
- g.data.temp_callnumbers = null; g.data.stash('temp_callnumbers');
+ g.data.temp_copy_ids = undefined; g.data.stash('temp_copy_ids');
+ g.data.temp_copies = undefined; g.data.stash('temp_copies');
+ g.data.temp_callnumbers = undefined; g.data.stash('temp_callnumbers');
if (!copies) {
alert('Items were not created.');
return;