fixed bug 0009598: Reset accounting process results in Call out response page
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 24 Jun 2009 12:47:40 +0200
changeset 4058 b8145e69620e
parent 4057 27b9c6b0026b
child 4059 cc9c20208b2e
fixed bug 0009598: Reset accounting process results in Call out response page
src-wad/src/org/openbravo/wad/Template_ActionButton.html
src-wad/src/org/openbravo/wad/WadActionButton.java
--- a/src-wad/src/org/openbravo/wad/Template_ActionButton.html	Tue Jun 23 17:52:25 2009 +0530
+++ b/src-wad/src/org/openbravo/wad/Template_ActionButton.html	Wed Jun 24 12:47:40 2009 +0200
@@ -42,6 +42,7 @@
 <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
 <FIELD_TMP id="importJS"></FIELD_TMP>
 <script language="JavaScript" type="text/javascript">
+var action="";
 
 if(top.opener) {
   var f = top.opener.top.frames['appFrame'];
@@ -61,7 +62,7 @@
 <script language="JavaScript" type="text/javascript" id="isGeneric">
 function submitThisPage(strCommand) {
   if (validate())
-    submitFormGetParams(strCommand, document.forms[0].action, getParamsScript(document.forms[0]));
+    submitFormGetParams(strCommand, action, getParamsScript(document.forms[0]));
 	return true;
 }
 </script>
@@ -86,6 +87,7 @@
 </script>
 	<script language="JavaScript" type="text/javascript">
 	function onLoadDo(){
+		action = document.forms[0].action;
 	    setProcessingMode('popup', false);
 		this.windowTables = new Array(
 		  new windowTableId('client', 'linkButtonOk')
--- a/src-wad/src/org/openbravo/wad/WadActionButton.java	Tue Jun 23 17:52:25 2009 +0530
+++ b/src-wad/src/org/openbravo/wad/WadActionButton.java	Wed Jun 24 12:47:40 2009 +0200
@@ -932,16 +932,8 @@
 
       script.append("\nfunction reloadComboReloads").append(fd.reference).append(
           "(changedField) {\n");
-      script.append("  var action;\n");
-      script.append("  if (document.forms[0]) {\n");
-      script.append("    action = document.forms[0].action;\n");
-      script.append("  }\n");
-
       script
           .append("  submitCommandForm(changedField, false, null, '../ad_callouts/ComboReloadsProcessHelper.html', 'hiddenFrame', null, null, true);\n");
-      script.append("  if (document.forms[0]) {\n");
-      script.append("    document.forms[0].action = action;\n");
-      script.append("  }\n");
       script.append("  return true;\n");
       script.append("}\n");