From: erickson Date: Wed, 13 Aug 2008 15:56:07 +0000 (+0000) Subject: removed an old chunk of code that had migrated to the jubgrid code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f01fe4adcc70d1d14a973681e6cea498484c38c7;p=Evergreen.git removed an old chunk of code that had migrated to the jubgrid code git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10352 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/acq/Picklist.js b/Open-ILS/web/js/dojo/openils/acq/Picklist.js index 202d31ca54..223db37e7c 100644 --- a/Open-ILS/web/js/dojo/openils/acq/Picklist.js +++ b/Open-ILS/web/js/dojo/openils/acq/Picklist.js @@ -95,75 +95,6 @@ dojo.declare('openils.acq.Picklist', null, { } return ''; }, - - /* MOVED INTO jubgrid.js .. safe to delete? - onJUBSet: function (griditem, attr, oldVal,newVal) { - var item; - var updateDone = function(r) { - var stat = r.recv().content(); - var evt = openils.Event.parse(stat); - - if (evt) { - alert("Error: "+evt.desc); - console.dir(evt); - } - }; - - // after an attribute has been updated - var attrUpdateDone = function(r, attr) { - var res = r.recv().content(); - if(e = openils.Event.parse(res)) - return alert(e); - var oldVal = new openils.acq.Lineitem( - {lineitem:item}).findAttr(attr, 'lineitem_local_attr_definition'); - if(oldVal) { - // if this attr already exists on the object, just update the value - for(var i = 0; i < item.attributes().length; i++) { - var attrobj = item.attributes()[i]; - if(attrobj.attr_type() == 'lineitem_local_attr_definition' && attrobj.attr_name() == attr) { - attrobj.attr_value(newVal); - } - } - } else { - // if this is a new attribute, create a new object to match reality - liad = new acqlia(); - liad.attr_type('lineitem_local_attr_definition'); - liad.attr_value(newVal); - liad.attr_name(attr); - liad.id(res); - item.attributes().push(liad); - } - } - - if (oldVal == newVal) { - return; - } - - item = this._data[griditem.id]; - if (attr == "provider") { - if(newVal == '') - newVal = null; - item.provider(newVal); - } else if(attr == 'estimated_price' || attr == 'actual_price') { - fieldmapper.standardRequest( - ['open-ils.acq', 'open-ils.acq.lineitem_local_attr.set'], - { async: true, - params: [openils.User.authtoken, item.id(), attr, newVal], - oncomplete: function(r) {attrUpdateDone(r, attr); } - } - ); - } else { - //alert("Unexpected attr in Picklist.onSet: '"+attr+"'"); - return; - } - - fieldmapper.standardRequest( - ["open-ils.acq", "open-ils.acq.lineitem.update"], - {params: [openils.User.authtoken, item], - oncomplete: updateDone - }); - }, - */ }); /** Creates a new picklist. fields.name is required */