[open-ils-commits] r13771 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 29 05:04:50 EDT 2009
Author: phasefx
Date: 2009-07-29 05:04:45 -0400 (Wed, 29 Jul 2009)
New Revision: 13771
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
Log:
use the right data on single row refresh
Modified: trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-07-29 08:21:46 UTC (rev 13770)
+++ trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-07-29 09:04:45 UTC (rev 13771)
@@ -81,7 +81,7 @@
function populate_list() {
try {
- rows = [];
+ rows = {};
list.clear();
for (var i = 0; i < xulG.patron.standing_penalties().length; i++) {
var row_params = {
@@ -93,7 +93,8 @@
}
}
};
- rows[ xulG.patron.standing_penalties()[i].id() ] = list.append( row_params );
+ rows[ xulG.patron.standing_penalties()[i].id() ] = function(p){ return p; }(row_params); // careful with vars in loops
+ list.append( row_params );
};
} catch(E) {
@@ -159,7 +160,8 @@
}
}
};
- rows[ req ] = list.append( row_params );
+ rows[ penalty.id() ] = row_params;
+ list.append( row_params );
}
if (xulG && typeof xulG.refresh == 'function') {
xulG.refresh();
@@ -268,7 +270,10 @@
oncomplete : function(r) {
try {
var res = openils.Util.readResponse(r,true);
- list.refresh_row( rows[ ids[i] ] );
+ var row_params = rows[ ids[i] ];
+ row_params.row.my.ausp = penalty;
+ row_params.row.my.csp = penalty.standing_penalty();
+ list.refresh_row( row_params );
document.getElementById('progress').hidden = true;
} catch(E) {
alert(E);
More information about the open-ils-commits
mailing list