[open-ils-commits] r18270 - branches/rel_2_0/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 11 16:40:10 EDT 2010
Author: phasefx
Date: 2010-10-11 16:40:04 -0400 (Mon, 11 Oct 2010)
New Revision: 18270
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Log:
initialize these lists just once to prevent display glitch
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js 2010-10-11 20:39:31 UTC (rev 18269)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js 2010-10-11 20:40:04 UTC (rev 18270)
@@ -1,6 +1,8 @@
var error;
var network;
var data;
+var transit_list;
+var hold_list;
function my_init() {
try {
@@ -39,6 +41,16 @@
);
}
+ JSAN.use('circ.util');
+ JSAN.use('util.list');
+
+ var columns = circ.util.transit_columns({});
+ transit_list = new util.list('transit');
+ transit_list.init( { 'columns' : columns, 'map_row_to_columns' : circ.util.std_map_row_to_columns(), });
+
+ hold_list = new util.list('hold');
+ hold_list.init( { 'columns' : columns, 'map_row_to_columns' : circ.util.std_map_row_to_columns(), });
+
// timeout so xulG gets a chance to get pushed in
setTimeout(
function () { xulG.from_item_details_new = false; load_item(); },
@@ -289,11 +301,9 @@
set("hold_transit_copy", '');
if (details.transit) {
- JSAN.use('circ.util'); var columns = circ.util.transit_columns({});
- JSAN.use('util.list'); var list = new util.list('transit');
- list.init( { 'columns' : columns, 'map_row_to_columns' : circ.util.std_map_row_to_columns(), });
- list.append( { 'row' : { 'my' : { 'atc' : details.transit, } } });
+ transit_list.clear();
+ transit_list.append( { 'row' : { 'my' : { 'atc' : details.transit, } } });
var transit_copy_status = typeof details.transit.copy_status() == 'object' ? details.transit.copy_status() : data.hash.ccs[ details.transit.copy_status() ];
set("transit_copy_status", transit_copy_status.name() );
@@ -593,9 +603,8 @@
}
);
- JSAN.use('util.list'); var list = new util.list('hold');
- list.init( { 'columns' : columns, 'map_row_to_columns' : circ.util.std_map_row_to_columns(), });
- list.append( { 'row' : { 'my' : { 'ahr' : better_fleshed_hold_blob.hold, 'acp' : details.copy, 'status' : status_robj, } } });
+ hold_list.clear();
+ hold_list.append( { 'row' : { 'my' : { 'ahr' : better_fleshed_hold_blob.hold, 'acp' : details.copy, 'status' : status_robj, } } });
JSAN.use('patron.util');
var au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), details.hold.usr() );
More information about the open-ils-commits
mailing list