details:   /erp/devel/pi/rev/c744307f581f
changeset: 11218:c744307f581f
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Mon Mar 14 12:48:28 2011 +0100
summary:   Fix rebuild popup for the Easy Extensible Attributes module

details:   /erp/devel/pi/rev/383c4bc112ce
changeset: 11219:383c4bc112ce
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Mon Mar 14 12:50:39 2011 +0100
summary:   Fixed issue 16217. Rebuild popup will not fail if there is no 
translated build file.

diffstat:

 src/org/openbravo/erpCommon/ad_process/ApplyModules.html            |  20 
+++++++--
 src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java |  13 
+++++-
 src/org/openbravo/erpCommon/ad_process/RestartingContext.html       |   3 -
 3 files changed, 26 insertions(+), 10 deletions(-)

diffs (113 lines):

diff -r 194ce35a04f8 -r 383c4bc112ce 
src/org/openbravo/erpCommon/ad_process/ApplyModules.html
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.html  Mon Mar 14 
12:51:17 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.html  Mon Mar 14 
12:50:39 2011 +0100
@@ -206,10 +206,16 @@
     //Restarts tomcat/Reloads tomcat/Just closes the window
     function restart() {
       if (document.frmMain.option[0].checked) {
-        window.opener.submitCommandForm('RESTART', false, null, 
'../ad_process/ApplyModules.html', '_self', null, false);
         restarting=true;
-        closePage();
-        return false;
+        if(window.opener){
+          window.opener.submitCommandForm('RESTART', false, null, 
'../ad_process/ApplyModules.html', '_self', null, false);
+          closePage();
+          return false;
+        }else{
+          top.opener.location="./ApplyModules.html?Command=RESTART";
+          closePage();
+          return false;
+        }
       } else if (document.frmMain.option[1].checked) {
         closePage();
         return;
@@ -448,7 +454,9 @@
             var frm = document.frmMain;
             startLocalTimer('localTimer');
             processing = true;
-            window.opener.setProcessingMode('window', true, false);
+            if(window.opener && window.opener.setProcessingMode){
+              window.opener.setProcessingMode('window', true, false);
+            }
             displayLogicElement('confirmation',false);
             displayLogicElement('rebuildTable',true);
             return submitXmlHttpRequest(endProcess, frm, "STARTAPPLY", 
"ApplyModules.html", false, null, null);
@@ -482,7 +490,9 @@
     }
     
     function onUnloadDo() {
-      window.opener.setProcessingMode('window', false);
+      if(window.opener && window.opener.setProcessingMode){
+          window.opener.setProcessingMode('window', false);
+      }
       if(!restarting){
         reloadOpener();
       }
diff -r 194ce35a04f8 -r 383c4bc112ce 
src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java       
Mon Mar 14 12:51:17 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java       
Mon Mar 14 12:50:39 2011 +0100
@@ -199,6 +199,8 @@
       else
         resp.setStatusofstate(defaultState);
     } catch (Exception e) {
+      // We need to use printStackTrace here because if not, the log will not 
be shown
+      e.printStackTrace();
     } finally {
       try {
         releasePreparedStatement(ps3);
@@ -235,6 +237,8 @@
       out.print(strResult);
       out.close();
     } catch (Exception e) {
+      // We need to use printStackTrace here because if not, the log will not 
be shown
+      e.printStackTrace();
     } finally {
       if (ps != null)
         try {
@@ -271,7 +275,9 @@
       strResult = xs.toXML(resp);
       out.print(strResult);
       out.close();
-    } catch (IOException e) {
+    } catch (Exception e) {
+      // We need to use printStackTrace here because if not, the log will not 
be shown
+      e.printStackTrace();
     }
   }
 
@@ -328,7 +334,8 @@
       } else {
         finalStep = build.getMainSteps().get(build.getMainSteps().size() - 1);
       }
-      if (vars.getLanguage().equals("en_US")) {
+      if (vars.getLanguage().equals("en_US")
+          || ApplyModules.getBuildTranslationFromFile(vars.getLanguage()) == 
null) {
         if (finalMessageType.equals("Error")) {
           error.setMessage(finalStep.getErrorMessage());
         } else if (finalMessageType.equals("Warning")) {
@@ -394,6 +401,8 @@
         ps3.executeUpdate();
       }
     } catch (Exception e) {
+      // We need to use printStackTrace here because if not, the log will not 
be shown
+      e.printStackTrace();
     }
   }
 
diff -r 194ce35a04f8 -r 383c4bc112ce 
src/org/openbravo/erpCommon/ad_process/RestartingContext.html
--- a/src/org/openbravo/erpCommon/ad_process/RestartingContext.html     Mon Mar 
14 12:51:17 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/RestartingContext.html     Mon Mar 
14 12:50:39 2011 +0100
@@ -37,13 +37,10 @@
   var maxSuccessNumber = 5;
 
   function onLoadDo(){
-    menuHide();
-    resizeArea();
     setTimeout("checkResponse(isResponse);",1500);
   }
 
   function onResizeDo(){
-    resizeArea();
   }
 </script>
 

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to