removed an old chunk of code that had migrated to the jubgrid code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Aug 2008 15:56:07 +0000 (15:56 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Aug 2008 15:56:07 +0000 (15:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10352 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/acq/Picklist.js

index 202d31c..223db37 100644 (file)
@@ -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 */