Paste number 60726: updateOnSet of grid entry

Index of paste annotations: 1

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:
Raw Source | XML | Display As
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:
Raw Source | Display As
[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=

Colorize as:
Show Line Numbers
Index of paste annotations: 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.