function populate_list() {
try {
- rows = [];
+ rows = {};
list.clear();
for (var i = 0; i < xulG.patron.standing_penalties().length; i++) {
var row_params = {
}
}
};
- 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) {
}
}
};
- rows[ req ] = list.append( row_params );
+ rows[ penalty.id() ] = row_params;
+ list.append( row_params );
}
if (xulG && typeof xulG.refresh == 'function') {
xulG.refresh();
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);