| Paste number 60726: | updateOnSet of grid entry |
| Pasted by: | djfiander |
| When: | 1 year, 1 month ago |
| Share: | Tweet this! | http://paste.lisp.org/+1AUU |
| Channel: | #openils-evergreen |
| Paste contents: |
openils.acq.Lineitems.alertOnSet = function(griditem, attr, oldVal, newVal) {
var item;
var updateDone = function(r) {
var stat = r.recv().content();
// XXX Check for Event
console.dir(stat);
alert("updateDone");
}
if (oldVal == newVal) {
alert("value edited, but not changed. skipping");
return;
}
console.dir(griditem);
item = openils.acq.Lineitems.acqlidCache[griditem.id];
if (item instanceof acqlid) {
alert("item is an acqlid");
} else {
alert("try again");
}
item.fund = newVal;
fieldmapper.standardRequest(
["open-ils.acq", "open-ils.acq.lineitem_detail.update"],
{ params: [openils.User.authtoken, item],
oncomplete: updateDone
});
};Annotations for this paste:
| Annotation number 1: | update log |
| Pasted by: | berick |
| When: | 1 year, 1 month ago |
| Share: | Tweet this! | http://paste.lisp.org/+1AUU#1 |
| Paste contents: |
[2008-05-13 21:35:05] open-ils.acq [ACT:10367:CStoreEditor.pm:100:] editor[1|3] acq.lineitem_detail.update fund= lineitem=32 location= isnew= barcode= ischanged= eg_copy_id= cn_label= id=32 recv_time= owning_lib= isdeleted= fund_debit=