[open-ils-commits] r7908 -
branches/rel_1_2/Open-ILS/xul/staff_client/server/circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 22 02:02:17 EDT 2007
Author: phasefx
Date: 2007-10-22 01:48:52 -0400 (Mon, 22 Oct 2007)
New Revision: 7908
Modified:
branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js
Log:
refresh via circ id, not barcode, to handle rename barcode action
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js 2007-10-22 05:47:48 UTC (rev 7907)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js 2007-10-22 05:48:52 UTC (rev 7908)
@@ -13,7 +13,7 @@
circ.copy_status.prototype = {
'selection_list' : [],
- 'list_barcode_map' : {},
+ 'list_copyid_map' : {},
'init' : function( params ) {
@@ -1025,15 +1025,23 @@
if (!refresh) {
var nparams = obj.list.append(params);
if (!document.getElementById('trim_list').checked) {
- if (typeof obj.list_barcode_map[barcode] == 'undefined') obj.list_barcode_map[barcode] =[];
- obj.list_barcode_map[barcode].push(nparams);
+ if (typeof obj.list_copyid_map[details.copy.id()] == 'undefined') obj.list_copyid_map[details.copy.id()] =[];
+ obj.list_copyid_map[details.copy.id()].push(nparams);
}
} else {
if (!document.getElementById('trim_list').checked) {
- for (var i = 0; i < obj.list_barcode_map[barcode].length; i++) {
- params.my_node = obj.list_barcode_map[barcode][i].my_node;
- obj.list.refresh_row(params);
- }
+ if (typeof obj.list_copyid_map[details.copy.id()] != 'undefined') {
+ for (var i = 0; i < obj.list_copyid_map[details.copy.id()].length; i++) {
+ if (typeof obj.list_copyid_map[details.copy.id()][i] == 'undefined') {
+ obj.list.append(params);
+ } else {
+ params.my_node = obj.list_copyid_map[details.copy.id()][i].my_node;
+ obj.list.refresh_row(params);
+ }
+ }
+ } else {
+ obj.list.append(params);
+ }
} else {
obj.list.append(params);
}
More information about the open-ils-commits
mailing list