[open-ils-commits] r8567 -
branches/rel_1_2_1/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 1 10:04:12 EST 2008
Author: phasefx
Date: 2008-02-01 09:36:26 -0500 (Fri, 01 Feb 2008)
New Revision: 8567
Modified:
branches/rel_1_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js
Log:
sidestep race condition with new volumes and db replication.. this should fix the Stat Cat popup errors, but we need to test on weezie
Modified: branches/rel_1_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js
===================================================================
--- branches/rel_1_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2008-02-01 14:24:01 UTC (rev 8566)
+++ branches/rel_1_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2008-02-01 14:36:26 UTC (rev 8567)
@@ -554,7 +554,12 @@
var cn_id = g.copies[i].call_number();
if (cn_id > 0) {
if (! g.map_acn[ cn_id ]) {
- g.map_acn[ cn_id ] = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ var req = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ if (typeof req.ilsevent == 'undefined') {
+ g.map_acn[ cn_id ] = req;
+ } else {
+ continue;
+ }
}
var consider_lib = g.map_acn[ cn_id ].owning_lib();
if ( libs.indexOf( String( consider_lib ) ) > -1 ) { /* already in list */ } else { libs.push( consider_lib ); }
@@ -1228,6 +1233,7 @@
/******************************************************************************************************/
/* hides or unhides stat cats based on library stat cat filter menu */
g.toggle_stat_cat_display = function(el) {
+ if (!el) return;
var visible = el.getAttribute('checked');
var nl = document.getElementsByAttribute('sc_lib',el.getAttribute('value'));
for (var n = 0; n < nl.length; n++) {
@@ -1383,7 +1389,13 @@
var cn_id = g.copies[i].call_number();
if (cn_id > 0) {
if (! g.map_acn[ cn_id ]) {
- g.map_acn[ cn_id ] = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ var req = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ if (typeof req.ilsevent == 'undefined') {
+ g.map_acn[ cn_id ] = req;
+ } else {
+ continue;
+ }
+
}
var owning_lib = g.map_acn[ cn_id ].owning_lib(); if (typeof owning_lib == 'object') owning_lib = owning_lib.id();
sc_libs[ owning_lib ] = true;
More information about the open-ils-commits
mailing list