details:   /erp/devel/main/rev/f3d0c13a03be
changeset: 8917:f3d0c13a03be
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Tue Nov 16 19:00:49 2010 +0100
summary:   Modified StaticCommunityBranding servlet to show offline content of 
MyOpenbravo.

details:   /erp/devel/main/rev/b5b590741504
changeset: 8918:b5b590741504
user:      RM packaging bot <staff.rm <at> openbravo.com>
date:      Wed Nov 17 06:59:39 2010 +0000
summary:   CI: promote changesets from pi to main

diffstat:

 src-db/database/sourcedata/AD_MODULE.xml                              |    4 +-
 src/org/openbravo/erpCommon/utility/Home.java                         |    2 +-
 src/org/openbravo/erpCommon/utility/StaticCommunityBranding.java      |   49 
++--
 web/html/en_US/StaticCommunityBranding-MyOB-Basic.html                |   92 
++++++++++
 web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoLeft.png  |    0 
 web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoRight.png |    0 
 web/html/en_US/StaticCommunityBranding-MyOB-Comm.html                 |   91 
+++++++++
 web/html/en_US/StaticCommunityBranding-MyOB-Comm_files/LogoLeft.png   |    0 
 web/html/en_US/StaticCommunityBranding-MyOB-Comm_files/LogoRight.png  |    0 
 web/html/en_US/StaticCommunityBranding-MyOB-STD.html                  |   90 
+++++++++
 web/html/en_US/StaticCommunityBranding-MyOB-STD_files/LogoLeft.png    |    0 
 web/html/en_US/StaticCommunityBranding-MyOB-STD_files/LogoRight.png   |    0 
 12 files changed, 298 insertions(+), 30 deletions(-)

diffs (truncated from 403 to 300 lines):

diff -r 7962725ee825 -r b5b590741504 src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml  Tue Nov 16 18:58:38 2010 +0100
+++ b/src-db/database/sourcedata/AD_MODULE.xml  Wed Nov 17 06:59:39 2010 +0000
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[Core]]></NAME>
-<!--0-->  <VERSION><![CDATA[2.50.18840]]></VERSION>
+<!--0-->  <VERSION><![CDATA[2.50.18917]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core 
are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
@@ -22,7 +22,7 @@
 <!--0-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--0-->  <REFERENCEDATAINFO><![CDATA[Standard document types for orders, 
invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0-->  <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
+<!--0-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0--></AD_MODULE>
 
diff -r 7962725ee825 -r b5b590741504 
src/org/openbravo/erpCommon/utility/Home.java
--- a/src/org/openbravo/erpCommon/utility/Home.java     Tue Nov 16 18:58:38 
2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/Home.java     Wed Nov 17 06:59:39 
2010 +0000
@@ -125,7 +125,7 @@
   private static String getUrls() throws ServletException {
     String url = "\nvar communityBrandingUrl = '" + 
Utility.getCommunityBrandingUrl("2.50")
         + "';\n";
-    url += "var staticUrl = '" + Utility.STATIC_COMMUNITY_BRANDING_URL + 
"';\n";
+    url += "var staticUrl = '" + Utility.STATIC_COMMUNITY_BRANDING_URL + 
"?uimode=2.50';\n";
     url += "var butlerUtilsUrl = '" + Utility.BUTLER_UTILS_URL + "'";
     return url;
   }
diff -r 7962725ee825 -r b5b590741504 
src/org/openbravo/erpCommon/utility/StaticCommunityBranding.java
--- a/src/org/openbravo/erpCommon/utility/StaticCommunityBranding.java  Tue Nov 
16 18:58:38 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/StaticCommunityBranding.java  Wed Nov 
17 06:59:39 2010 +0000
@@ -36,44 +36,39 @@
   public void doPost(HttpServletRequest request, HttpServletResponse response) 
throws IOException,
       ServletException {
     VariablesSecureApp vars = new VariablesSecureApp(request);
+    String uimode = vars.getStringParameter("uimode");
     if (vars.commandIn("DEFAULT")) {
-      printPage(response);
+      printPage(response, uimode);
     } else
       pageError(response);
 
   }
 
-  private void printPage(HttpServletResponse response) throws IOException {
+  private void printPage(HttpServletResponse response, String strUIMode) 
throws IOException {
     log4j.debug("Output: dataSheet");
     final LicenseClass licenseClass = 
ActivationKey.getInstance().getLicenseClass();
-    final String strVersion = OBVersion.getInstance().getMajorVersion();
 
-    String strUrl = strDireccion + "/web/html/" + "en_US";
-    if (strVersion.startsWith("3")) {
-      if (LicenseClass.COMMUNITY.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Comm.html");
-      } else if (LicenseClass.BASIC.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Basic.html");
-      } else if (LicenseClass.STD.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-STD.html");
-      } else {
-        // Unknown license class, showing community content.
-        log4j.error("unknown license class: " + licenseClass.getCode());
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Comm.html");
-      }
+    String strFilename = "/StaticCommunityBranding-";
+    strFilename += strUIMode;
+    if (LicenseClass.COMMUNITY.equals(licenseClass)) {
+      strFilename += "-Comm";
+    } else if (LicenseClass.BASIC.equals(licenseClass)) {
+      strFilename += "-Basic";
+    } else if (LicenseClass.STD.equals(licenseClass)) {
+      strFilename += "-STD";
     } else {
-      if (LicenseClass.COMMUNITY.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Comm.html");
-      } else if (LicenseClass.BASIC.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Basic.html");
-      } else if (LicenseClass.STD.equals(licenseClass)) {
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-STD.html");
-      } else {
-        // Unknown license class, showing community content.
-        log4j.error("unknown license class: " + licenseClass.getCode());
-        response.sendRedirect(strUrl + 
"/StaticCommunityBranding-2.50-Comm.html");
-      }
+      // Unknown license class, showing community content.
+      log4j.error("unknown license class: " + licenseClass.getCode());
+      strFilename += "-Comm";
     }
+    strFilename += ".html";
 
+    redirect(response, strFilename);
+  }
+
+  private void redirect(HttpServletResponse response, String filename) throws 
IOException {
+    String strUrl = strDireccion + "/web/html/";
+    strUrl += "en_US" + filename;
+    response.sendRedirect(strUrl);
   }
 }
diff -r 7962725ee825 -r b5b590741504 
web/html/en_US/StaticCommunityBranding-MyOB-Basic.html
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/web/html/en_US/StaticCommunityBranding-MyOB-Basic.html    Wed Nov 17 
06:59:39 2010 +0000
@@ -0,0 +1,92 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+<style type="text/css">
+<!--
+p {font-size: 12px; font-family: sans-serif; line-height: 18px;} 
+h1 {font-size: 16px; font-family: sans-serif;} 
+a:link {color: #58A618; text-decoration: underline;}
+a:visited {color: #58A618; text-decoration: underline;}
+a:hover {color: #000000; text-decoration: underline;}
+-->
+</style>
+<script type="text/javascript">
+  function onResizeDo() {
+    var LinksCont = document.getElementById('LinksCont');
+    var TextCont = document.getElementById('TextCont');
+    var LogoCont = document.getElementById('LogoCont');
+    var body = document.getElementsByTagName('BODY');
+    var bodyHeight = body[0].clientHeight;
+    var bodyWidth = body[0].clientWidth;
+    LinksCont.style.display = '';
+    TextCont.style.display = '';
+    LogoCont.style.display = '';
+    TextCont.style.height = '';
+    TextCont.style.width = bodyWidth - LinksCont.clientWidth - 30;
+    if (TextCont.clientHeight > 147) {
+      LinksCont.style.height = TextCont.clientHeight;
+    } else {
+      TextCont.style.height = 148;
+    }
+    LogoCont.style.width = LinksCont.clientWidth + TextCont.clientWidth + 10;
+    LogoMiddleCont.style.width = LogoCont.clientWidth - 
LogoLeftCont.clientWidth - LogoRightCont.clientWidth - 23;
+
+    if (LogoMiddleCont.clientWidth > 180) {
+      document.getElementById('LogoMiddleText').style.display = '';
+    } else {
+      document.getElementById('LogoMiddleText').style.display = 'none';
+    }
+  }
+
+  function onLoadDo() {
+    onResizeDo();
+    onResizeDo();
+  }
+</script>
+</head>
+<body bgcolor="#e9e9e9" style="margin: 0; padding: 0;" onload="onLoadDo();" 
onresize="onResizeDo();">
+
+<div style="background-color: #e9e9e9; overflow: hidden; padding: 0; margin: 
0;">
+
+    <div style="position: relative; float: left; width: 141px; height: 143px; 
background-color: #f8f8f8; -moz-border-radius: 10px; border-radius: 10px; 
margin: 8px 3px 8px 8px; display: none;" id="LinksCont">
+      <h1 style="border-bottom: 1px dotted rgb(88, 166, 24); margin-left: 
15px; margin-top: 10px; margin-right: 5px;">Links</h1>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://www.openbravo.com/"; target="_blank">Openbravo.com</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://exchange.openbravo.com/"; target="_blank">Exchange</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://planet.openbravo.com/"; target="_blank">Planet</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://forge.openbravo.com/"; target="_blank">Forge</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://wiki.openbravo.com/"; target="_blank">Wiki</a></p>
+    </div>
+
+
+    <div style="width: 100px; position: relative; float: left; 
background-color: #f8f8f8; -moz-border-radius: 10px; border-radius: 10px; 
margin: 8px 8px 3px 7px; display: none;" id="TextCont">
+      <h1 style="border-bottom: 1px dotted rgb(88, 166, 24); margin-left: 
15px; margin-top: 10px; margin-right: 5px;">Take your business to the next 
level!<br>
+      </h1>
+      <p style="margin-top: -8px; margin-left: 15px; margin-right: 
10px;">Thank you for subscribing. As a Basic Edition customer you experience 
the 
+value of easily keeping your ERP up to date, extending it with new 
+modules, and quickly adapting your screens.&nbsp; 
+Now you can get even more strategic value by choosing an accredited service 
provider in Openbravo's global <a 
href="http://www.openbravo.com/partners/find-partners-support/"; 
target="_blank">partner network</a>. For more information<a 
href="http://www.openbravo.com/partners/find-partners-support/"; 
target="_blank"></a>, please&nbsp; <a 
href="http://www.openbravo.com/form/customer/index.php?source=Form - Basic 
Edition" target="_blank">contact us</a>. <a 
href="http://exchange.openbravo.com/"; target="_blank"><br>
+</a><a href="http://exchange.openbravo.com/"; target="_blank"><br>
+        </a></p>
+    </div>
+
+
+  <br style="clear: both;">
+
+
+  <div style="float: left; height: 145px; background-color: #f8f8f8; 
-moz-border-radius: 10px; border-radius: 10px; margin: 3px 6px 6px 8px; 
display: none;" id="LogoCont">
+    <h1 style="margin-left: 15px; margin-top: 10px; margin-right: 5px;">Why 
upgrade to <a href="http://www.openbravo.com/product/erp/"; 
target="_blank">Openbravo Professional Edition?</a></h1>
+    <div onclick="window.open('http://www.openbravo.com/product/erp/');return 
false;" style="cursor: pointer;">
+      <div style="float: left; width: 270px; height: 92px; background-color: 
#E6E6E6; -moz-border-radius-topleft: 10px; -moz-border-radius-bottomleft: 10px; 
border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top: 1px 
solid #D8D8D8; border-left: 1px solid #D8D8D8; border-bottom: 1px solid 
#D8D8D8; margin-left: 10px;" id="LogoLeftCont">
+        <img src="StaticCommunityBranding-MyOB-Basic_files/LogoLeft.png" 
style="border: 0; margin: 6px 0px 0px 8px;" />
+      </div>
+      <div style="float: left; height: 92px; width: 10px; background-color: 
#E6E6E6; border-top: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;" 
id="LogoMiddleCont"></div>
+      <div style="float: left; width: 66px; height: 92px; background-color: 
#E6E6E6; -moz-border-radius-topright: 10px; -moz-border-radius-bottomright: 
10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; 
border-top: 1px solid #D8D8D8; border-right: 1px solid #D8D8D8; border-bottom: 
1px solid #D8D8D8;" id="LogoRightCont">
+        <div style="width: 65px; height: 90px;">
+          <img src="StaticCommunityBranding-MyOB-Basic_files/LogoRight.png" 
style="border: 0; margin: 0px 0px 0px 2px;" />
+        <div>
+      </div>
+    </div>
+  </div>
+</div>
+
+</body></html>
\ No newline at end of file
diff -r 7962725ee825 -r b5b590741504 
web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoLeft.png
Binary file 
web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoLeft.png has changed
diff -r 7962725ee825 -r b5b590741504 
web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoRight.png
Binary file 
web/html/en_US/StaticCommunityBranding-MyOB-Basic_files/LogoRight.png has 
changed
diff -r 7962725ee825 -r b5b590741504 
web/html/en_US/StaticCommunityBranding-MyOB-Comm.html
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/web/html/en_US/StaticCommunityBranding-MyOB-Comm.html     Wed Nov 17 
06:59:39 2010 +0000
@@ -0,0 +1,91 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+<style type="text/css">
+<!--
+p {font-size: 12px; font-family: sans-serif; line-height: 18px;} 
+h1 {font-size: 16px; font-family: sans-serif;} 
+a:link {color: #58A618; text-decoration: underline;}
+a:visited {color: #58A618; text-decoration: underline;}
+a:hover {color: #000000; text-decoration: underline;}
+-->
+</style>
+<script type="text/javascript">
+  function onResizeDo() {
+    var LinksCont = document.getElementById('LinksCont');
+    var TextCont = document.getElementById('TextCont');
+    var LogoCont = document.getElementById('LogoCont');
+    var body = document.getElementsByTagName('BODY');
+    var bodyHeight = body[0].clientHeight;
+    var bodyWidth = body[0].clientWidth;
+    LinksCont.style.display = '';
+    TextCont.style.display = '';
+    LogoCont.style.display = '';
+    TextCont.style.height = '';
+    TextCont.style.width = bodyWidth - LinksCont.clientWidth - 30;
+    if (TextCont.clientHeight > 147) {
+      LinksCont.style.height = TextCont.clientHeight;
+    } else {
+      TextCont.style.height = 148;
+    }
+    LogoCont.style.width = LinksCont.clientWidth + TextCont.clientWidth + 10;
+    LogoMiddleCont.style.width = LogoCont.clientWidth - 
LogoLeftCont.clientWidth - LogoRightCont.clientWidth - 23;
+
+    if (LogoMiddleCont.clientWidth > 180) {
+      document.getElementById('LogoMiddleText').style.display = '';
+    } else {
+      document.getElementById('LogoMiddleText').style.display = 'none';
+    }
+  }
+
+  function onLoadDo() {
+    onResizeDo();
+    onResizeDo();
+  }
+</script>
+</head>
+<body bgcolor="#e9e9e9" style="margin: 0; padding: 0;" onload="onLoadDo();" 
onresize="onResizeDo();">
+
+<div style="background-color: #e9e9e9; overflow: hidden; padding: 0; margin: 
0;">
+
+    <div style="position: relative; float: left; width: 141px; height: 143px; 
background-color: #f8f8f8; -moz-border-radius: 10px; border-radius: 10px; 
margin: 8px 3px 8px 8px; display: none;" id="LinksCont">
+      <h1 style="border-bottom: 1px dotted rgb(88, 166, 24); margin-left: 
15px; margin-top: 10px; margin-right: 5px;">Links</h1>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://www.openbravo.com/"; target="_blank">Openbravo.com</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://exchange.openbravo.com/"; target="_blank">Exchange</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://planet.openbravo.com/"; target="_blank">Planet</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://forge.openbravo.com/"; target="_blank">Forge</a></p>
+      <p style="margin-top: -8px; margin-left: 15px;"><a 
href="http://wiki.openbravo.com/"; target="_blank">Wiki</a></p>
+    </div>
+
+
+    <div style="width: 100px; position: relative; float: left; 
background-color: #f8f8f8; -moz-border-radius: 10px; border-radius: 10px; 
margin: 8px 8px 3px 7px; display: none;" id="TextCont">
+      <h1 style="border-bottom: 1px dotted rgb(88, 166, 24); margin-left: 
15px; margin-top: 10px; margin-right: 5px;">Extend your ERP with Module 
Management<br>
+      </h1>
+      <p style="margin-top: -8px; margin-left: 15px; margin-right: 
10px;">Discover the power of the Openbravo ecosystem
+       and extend your Openbravo system with modules. <a 
href="http://wiki.openbravo.com/wiki/ERP/2.50/Configuration_Manual/Personalizing_Openbravo_ERP#Installing_a_module_from_the_Central_Repository";
 target="_blank">These 
+      instructions</a> will get you started exploring the many available 
modules that will save you time &amp; money and increase the
+       power of your organization. For more information or to be put into 
contact with an accredited <a 
href="http://www.openbravo.com/partners/find-partners-support/"; 
target="_blank">Openbravo partner</a>, please <a 
href="http://www.openbravo.com/form/customer/index.php?source=Form - Community 
Edition" target="_blank">contact us</a>.<a 
href="http://exchange.openbravo.com/"; target="_blank"><br>
+        </a></p>
+    </div>
+
+
+  <br style="clear: both;">
+
+
+  <div style="float: left; height: 145px; background-color: #f8f8f8; 
-moz-border-radius: 10px; border-radius: 10px; margin: 3px 6px 6px 8px; 
display: none;" id="LogoCont">
+    <h1 style="margin-left: 15px; margin-top: 10px; margin-right: 5px;">Why 
upgrade to <a href="http://www.openbravo.com/product/erp/get-basic/"; 
target="_blank">Basic Edition?</a></h1>
+    <div 
onclick="window.open('http://www.openbravo.com/product/erp/get-basic/'); return 
false;" style="cursor: pointer;">
+      <div style="float: left; width: 270px; height: 92px; background-color: 
#E6E6E6; -moz-border-radius-topleft: 10px; -moz-border-radius-bottomleft: 10px; 
border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top: 1px 
solid #D8D8D8; border-left: 1px solid #D8D8D8; border-bottom: 1px solid 
#D8D8D8; margin-left: 10px;" id="LogoLeftCont">
+        <img src="StaticCommunityBranding-MyOB-Comm_files/LogoLeft.png" 
style="border: 0; margin: 6px 0px 0px 8px;" />
+      </div>
+      <div style="float: left; height: 92px; width: 10px; background-color: 
#E6E6E6; border-top: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;" 
id="LogoMiddleCont"></div>
+      <div style="float: left; width: 66px; height: 92px; background-color: 
#E6E6E6; -moz-border-radius-topright: 10px; -moz-border-radius-bottomright: 
10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; 
border-top: 1px solid #D8D8D8; border-right: 1px solid #D8D8D8; border-bottom: 
1px solid #D8D8D8;" id="LogoRightCont">
+        <div style="width: 65px; height: 90px;">
+          <img src="StaticCommunityBranding-MyOB-Comm_files/LogoRight.png" 
style="border: 0; margin: 0px 0px 0px 2px;" />
+        <div>
+      </div>
+    </div>
+  </div>
+</div>
+
+</body></html>
\ No newline at end of file

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to