svn commit: r1002537 - /ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1002537 - /ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js

jleroux@apache.org
Author: jleroux
Date: Wed Sep 29 09:38:20 2010
New Revision: 1002537

URL: http://svn.apache.org/viewvc?rev=1002537&view=rev
Log:
Migrate getServiceResult

Modified:
    ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js

Modified: ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js?rev=1002537&r1=1002536&r2=1002537&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js Wed Sep 29 09:38:20 2010
@@ -85,15 +85,16 @@ function getDependentDropdownValues(requ
     }, 'json');
 }
   
-// calls any service already mounted as an event
+//*** calls any service already mounted as an event
 function getServiceResult(request, params) {
-    var data;
-    new Ajax.Request(request, {
-        asynchronous: false,
-        parameters: params,
-        onSuccess: function(transport) {
-            data = transport.responseText.evalJSON(true);          
-        }
-    });
-    return data;
-}
\ No newline at end of file
+    data = [];
+    jQuery.each(params, function (key, value) { data.add({ name: key, value: value}); }
+    return jQuery.post(request, data, function(result) { return result; }
+}
+
+//*** checkUomConversion returns true if an UomConversion exists
+function checkUomConversion(request, params) {
+    data = getServiceResult(request, params);    
+    return data['exist'];
+}
+