[open-ils-commits] r10351 - in branches/acq-experiment/Open-ILS/web: js/dojo/openils/acq oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 13 11:55:20 EDT 2008


Author: erickson
Date: 2008-08-13 11:55:17 -0400 (Wed, 13 Aug 2008)
New Revision: 10351

Modified:
   branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Lineitem.js
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
Log:
fetch the full object on lineitem_detail create to capture any auto-generated fields

Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Lineitem.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Lineitem.js	2008-08-13 15:54:24 UTC (rev 10350)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Lineitem.js	2008-08-13 15:55:17 UTC (rev 10351)
@@ -201,13 +201,13 @@
     fieldmapper.standardRequest(
 	['open-ils.acq', 'open-ils.acq.lineitem_detail.create'],
 	{ async: true,
-	  params: [openils.User.authtoken, lid],
+	  params: [openils.User.authtoken, lid, {return_obj:1}],
 	  oncomplete: function(r) {
 	      var msg = r.recv();
-
-	      fields.id = msg.content();
+          var obj = msg.content();
+          openils.Event.parse_and_raise(obj);
 	      if (onCreateComplete) {
-		  onCreateComplete(fields);
+		    onCreateComplete(obj);
 	      }
 	  }
 	});

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js	2008-08-13 15:54:24 UTC (rev 10350)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js	2008-08-13 15:55:17 UTC (rev 10351)
@@ -267,8 +267,9 @@
 
     createLID: function(fields) {
         fields['lineitem'] = JUBGrid.jubDetailGrid.lineitemID;
-        var addToStore = function () {
-            JUBGrid.jubDetailGrid.model.store.newItem(fields);
+        var addToStore = function (lid) {
+            //JUBGrid.jubDetailGrid.model.store.newItem(fields);
+            JUBGrid.jubDetailGrid.model.store.newItem(acqlid.toStoreData([lid]).items[0]);
             JUBGrid.jubDetailGrid.refresh();
             JUBGrid.jubGrid.update();
             JUBGrid.jubGrid.refresh();



More information about the open-ils-commits mailing list