You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/09/29 11:38:21 UTC
svn commit: r1002537 -
/ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js
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'];
+}
+