Author: apatel
Date: Tue Jun 24 18:53:49 2008
New Revision: 671394
URL:
http://svn.apache.org/viewvc?rev=671394&view=revLog:
After form is posted in background we should not update the form area. This causes problem if form area has embedded <script> block.
Removed this requirement. Instead now we reset form after update. Now I think we need to check for errors before reseting the form. This will help user to modify data and resubmit. I'll do that next.
Modified:
ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
ofbiz/trunk/framework/images/webapp/images/selectall.js
Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=671394&r1=671393&r2=671394&view=diff==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Tue Jun 24 18:53:49 2008
@@ -126,7 +126,6 @@
<form name="EditExampleBackgroundSubmit" type="single" extends="EditExample" target="updateExampleAjax">
<alt-target use-when="example==null" target="createExampleAjax"/>
<on-event-update-area event-type="submit" area-id="ListExamplesAjax" area-target="ListExampleFormOnly"/>
- <on-event-update-area event-type="submit" area-id="EditExampleAjax" area-target="CreateExampleFormOnly"/>
</form>
<!-- ExampleItem -->
Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=671394&r1=671393&r2=671394&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Tue Jun 24 18:53:49 2008
@@ -283,7 +283,13 @@
*/
function ajaxSubmitFormUpdateAreas(form, areaCsvString) {
submitFormDisableSubmits($(form));
- ajaxSubmitRequestUpdateAreas($(form).action, $(form).serialize(true), areaCsvString);
+ updateFunction = function(transport) {
+ $(form).reset();
+ ajaxUpdateAreas(areaCsvString);
+ }
+ new Ajax.Request($(form).action, {
+ parameters: $(form).serialize(true),
+ onComplete: updateFunction });
}
/** Enable auto-completion for text elements.