[open-ils-commits] r10352 -
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 13 11:56:10 EDT 2008
Author: erickson
Date: 2008-08-13 11:56:07 -0400 (Wed, 13 Aug 2008)
New Revision: 10352
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Picklist.js
Log:
removed an old chunk of code that had migrated to the jubgrid code
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Picklist.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Picklist.js 2008-08-13 15:55:17 UTC (rev 10351)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Picklist.js 2008-08-13 15:56:07 UTC (rev 10352)
@@ -95,75 +95,6 @@
}
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 */
More information about the open-ils-commits
mailing list