details:   /erp/devel/int/rev/4de2c0c60dd6
changeset: 6776:4de2c0c60dd6
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Mon Mar 22 12:27:47 2010 +0100
summary:   Fixes issue 12756: Added support for hideMenu url parameter

details:   /erp/devel/int/rev/52c228e6b546
changeset: 6777:52c228e6b546
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Mon Mar 22 13:11:15 2010 +0100
summary:   Fixes issue 12756: Fixed menu width in login window

details:   /erp/devel/int/rev/49bda7d3d580
changeset: 6778:49bda7d3d580
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Mon Mar 22 17:50:35 2010 +0100
summary:   Related to issue 12046: Now selectors opened with ENTER key opens 
properly in FF3.6

details:   /erp/devel/int/rev/419a4aedd233
changeset: 6779:419a4aedd233
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Mon Mar 22 18:59:51 2010 +0100
summary:   Fixes issue 0012693: Review on delete triggers

diffstat:

 src-db/database/model/triggers/C_BPARTNER_TRG.xml      |   6 +-
 src-db/database/model/triggers/C_BPARTNER_TRG2.xml     |  43 ++++++++++++++++++
 src-db/database/model/triggers/M_PRODUCT_TRG.xml       |   5 +-
 src-db/database/model/triggers/M_PRODUCT_TRG2.xml      |  38 +++++++++++++++
 src/org/openbravo/erpCommon/security/Login.java        |   5 ++
 src/org/openbravo/erpCommon/security/Login_F1.html     |   2 +-
 src/org/openbravo/erpCommon/security/Login_FS.html     |   3 +-
 src/org/openbravo/erpCommon/security/Login_FS.xml      |  10 ++-
 src/org/openbravo/erpCommon/security/Login_FS_RTL.html |   3 +-
 src/org/openbravo/erpCommon/security/Login_FS_RTL.xml  |  10 ++-
 src/org/openbravo/erpCommon/security/Menu.java         |  22 +++++++-
 web/js/searchs.js                                      |   4 +-
 web/js/utils.js                                        |   2 +-
 13 files changed, 127 insertions(+), 26 deletions(-)

diffs (truncated from 329 to 300 lines):

diff -r 24b5a4a1accd -r 419a4aedd233 
src-db/database/model/triggers/C_BPARTNER_TRG.xml
--- a/src-db/database/model/triggers/C_BPARTNER_TRG.xml Mon Mar 22 15:30:20 
2010 +0530
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG.xml Mon Mar 22 18:59:51 
2010 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER C_BPARTNER_TRG">
-    <trigger name="C_BPARTNER_TRG" table="C_BPARTNER" fires="after" 
insert="true" update="true" delete="true" foreach="row">
+    <trigger name="C_BPARTNER_TRG" table="C_BPARTNER" fires="after" 
insert="true" update="true" delete="false" foreach="row">
       <body><![CDATA[
   /*************************************************************************
   * The contents of this file are subject to the Compiere Public
@@ -17,7 +17,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -267,8 +267,6 @@
      WHERE C_BPARTNER_ID = :new.C_BPartner_ID;
      UPDATE C_BP_EMPLOYEE_ACCT SET AD_ORG_ID = :new.AD_Org_ID
      WHERE C_BPARTNER_ID = :new.C_BPartner_ID;
-  ELSIF (DELETING) THEN
-     DELETE FROM AD_TreeNodeBP WHERE AD_Client_ID = :old.AD_Client_ID AND 
Node_ID = :old.C_BPartner_ID;
   END IF;
 EXCEPTION
  WHEN NO_DATA_FOUND THEN
diff -r 24b5a4a1accd -r 419a4aedd233 
src-db/database/model/triggers/C_BPARTNER_TRG2.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG2.xml        Mon Mar 22 
18:59:51 2010 +0100
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER C_BPARTNER_TRG2">
+    <trigger name="C_BPARTNER_TRG2" table="C_BPARTNER" fires="before" 
insert="false" update="false" delete="true" foreach="row">
+      <body><![CDATA[
+  /*************************************************************************
+  * The contents of this file are subject to the Compiere Public
+  * License 1.1 ("License"); You may not use this file except in
+  * compliance with the License. You may obtain a copy of the License in
+  * the legal folder of your Openbravo installation.
+  * Software distributed under the License is distributed on an
+  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  * implied. See the License for the specific language governing rights
+  * and limitations under the License.
+  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
+  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
+  * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
+  * All Rights Reserved.
+  * Contributor(s): Openbravo SLU
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
+  *
+  * Specifically, this derivative work is based upon the following Compiere
+  * file and version.
+  *************************************************************************
+  * $Id: C_BPartner_Trg2.sql,v 1.4 2002/10/23 03:16:57 jjanke Exp $
+  ***
+  * Title: Business Partner delete necord
+  * Description:
+  ************************************************************************/
+    
+BEGIN
+    
+       IF AD_isTriggerEnabled()='N' THEN 
+               RETURN OLD;
+       END IF;
+ 
+       DELETE FROM AD_TreeNodeBP WHERE AD_Client_ID = :old.AD_Client_ID AND 
Node_ID = :old.C_BPartner_ID;
+       RETURN OLD;
+     
+END C_BPARTNER_TRG2
+]]></body>
+    </trigger>
+  </database>
diff -r 24b5a4a1accd -r 419a4aedd233 
src-db/database/model/triggers/M_PRODUCT_TRG.xml
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml  Mon Mar 22 15:30:20 
2010 +0530
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml  Mon Mar 22 18:59:51 
2010 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER M_PRODUCT_TRG">
-    <trigger name="M_PRODUCT_TRG" table="M_PRODUCT" fires="after" 
insert="true" update="true" delete="true" foreach="row">
+    <trigger name="M_PRODUCT_TRG" table="M_PRODUCT" fires="after" 
insert="true" update="true" delete="false" foreach="row">
       <body><![CDATA[
 /*************************************************************************
   * The contents of this file are subject to the Compiere Public
@@ -190,9 +190,6 @@
          :new.IsActive, :new.Created, :new.CreatedBy, :new.Updated, 
:new.UpdatedBy,
          v_xTree_ID, :new.M_Product_ID,
          v_xParent_ID, (CASE :new.IsSummary WHEN 'Y' THEN 100 ELSE 999 END));  
  -- Summary Nodes first
-         
- ELSIF (DELETING) THEN
-    DELETE FROM AD_TreeNodePR WHERE AD_Client_ID = :old.AD_Client_ID AND 
Node_ID = :old.M_Product_ID;
  END IF;
  IF (INSERTING OR UPDATING) THEN
     -- Checks on the attribute set value
diff -r 24b5a4a1accd -r 419a4aedd233 
src-db/database/model/triggers/M_PRODUCT_TRG2.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG2.xml Mon Mar 22 18:59:51 
2010 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER M_PRODUCT_TRG2">
+    <trigger name="M_PRODUCT_TRG2" table="M_PRODUCT" fires="before" 
insert="false" update="false" delete="true" foreach="row">
+      <body><![CDATA[
+/*************************************************************************
+  * The contents of this file are subject to the Compiere Public
+  * License 1.1 ("License"); You may not use this file except in
+  * compliance with the License. You may obtain a copy of the License in
+  * the legal folder of your Openbravo installation.
+  * Software distributed under the License is distributed on an
+  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  * implied. See the License for the specific language governing rights
+  * and limitations under the License.
+  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
+  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
+  * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
+  * All Rights Reserved.
+  * Contributor(s): Openbravo SLU
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
+  *
+  * Specifically, this derivative work is based upon the following Compiere
+  * file and version.
+  *************************************************************************/
+                       
+BEGIN
+    IF AD_isTriggerEnabled()='N' THEN 
+        RETURN OLD;
+    END IF;
+
+    DELETE FROM AD_TreeNodePR WHERE AD_Client_ID = :old.AD_Client_ID AND 
Node_ID = :old.M_Product_ID;
+
+    RETURN OLD;
+
+END M_PRODUCT_TRG2
+]]></body>
+    </trigger>
+  </database>
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login.java
--- a/src/org/openbravo/erpCommon/security/Login.java   Mon Mar 22 15:30:20 
2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login.java   Mon Mar 22 18:59:51 
2010 +0100
@@ -99,6 +99,11 @@
       xmlDocument.setParameter("frame1", strDetalle);
     }
 
+    String jsConstants = "\nvar isMenuHide = false; \n var isRTL = " + 
"RTL".equals(textDirection)
+        + "; \n var menuWidth = '25%';\n var isMenuBlock = false;\n";
+
+    xmlDocument.setParameter("jsConstants", jsConstants);
+    xmlDocument.setParameter("framesetMenu", "25");
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
     out.println(xmlDocument.print());
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login_F1.html
--- a/src/org/openbravo/erpCommon/security/Login_F1.html        Mon Mar 22 
15:30:20 2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login_F1.html        Mon Mar 22 
18:59:51 2010 +0100
@@ -90,7 +90,7 @@
       clearForm();
     } catch (e) {}
     setWindowElementFocus('firstElement');
-    if ((!revisionControl('6734')) || (isOpsInstance() != 
isOpsInstanceCached())) {
+    if ((!revisionControl('6778')) || (isOpsInstance() != 
isOpsInstanceCached())) {
       alert(cacheMsg);
     }
 
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login_FS.html
--- a/src/org/openbravo/erpCommon/security/Login_FS.html        Mon Mar 22 
15:30:20 2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login_FS.html        Mon Mar 22 
18:59:51 2010 +0100
@@ -21,7 +21,8 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Openbravo</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" 
type="image/x-icon" />
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" id="jsConstants">
+  // WARNING: This variables come modified from the backend
   var isMenuHide = false;
   var isMenuBlock = false;
   var isRTL = false;
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login_FS.xml
--- a/src/org/openbravo/erpCommon/security/Login_FS.xml Mon Mar 22 15:30:20 
2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login_FS.xml Mon Mar 22 18:59:51 
2010 +0100
@@ -10,16 +10,18 @@
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 <REPORT>
        <template file="Login_FS.html"/>
+    <PARAMETER id="jsConstants" name="jsConstants" default="" />
+    <PARAMETER id="framesetMenu" name="framesetMenu" attribute="cols" 
replace="25" />
        <PARAMETER id="paramFrame1" name="frame1" attribute="src"/>
        <PARAMETER id="paramFrameMenu" name="frameMenu" attribute="src"/>
        <PARAMETER id="paramFrameMenuLoading" name="frameMenuLoading" 
attribute="src"/>
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login_FS_RTL.html
--- a/src/org/openbravo/erpCommon/security/Login_FS_RTL.html    Mon Mar 22 
15:30:20 2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login_FS_RTL.html    Mon Mar 22 
18:59:51 2010 +0100
@@ -21,7 +21,8 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Openbravo</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" 
type="image/x-icon" />
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" id="jsConstants">
+  // WARNING: This variables come modified from the backend
   var isMenuHide = false;
   var isRTL = true;
   var menuWidth = '25%';
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Login_FS_RTL.xml
--- a/src/org/openbravo/erpCommon/security/Login_FS_RTL.xml     Mon Mar 22 
15:30:20 2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Login_FS_RTL.xml     Mon Mar 22 
18:59:51 2010 +0100
@@ -10,16 +10,18 @@
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 <REPORT>
        <template file="Login_FS_RTL.html"/>
+    <PARAMETER id="jsConstants" name="jsConstants" default="" />
+    <PARAMETER id="framesetMenu" name="framesetMenu" attribute="cols" 
replace="25" />
        <PARAMETER id="paramFrame1" name="frame1" attribute="src"/>
        <PARAMETER id="paramFrameMenu" name="frameMenu" attribute="src"/>
        <PARAMETER id="paramFrameMenuLoading" name="frameMenuLoading" 
attribute="src"/>
diff -r 24b5a4a1accd -r 419a4aedd233 
src/org/openbravo/erpCommon/security/Menu.java
--- a/src/org/openbravo/erpCommon/security/Menu.java    Mon Mar 22 15:30:20 
2010 +0530
+++ b/src/org/openbravo/erpCommon/security/Menu.java    Mon Mar 22 18:59:51 
2010 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -44,6 +44,9 @@
 
 public class Menu extends HttpSecureAppServlet {
   private static final long serialVersionUID = 1L;
+  private static String[] hideMenuValues = { "", "true", "false" };
+  private static ValueListFilter menuFilter = new 
ValueListFilter(Menu.hideMenuValues);
+  private static String DEFAULT_MENU_WIDTH = "25"; // Percentage of the page 
width used by the menu
 
   /** Creates a new instance of Menu */
   public Menu() {
@@ -55,15 +58,17 @@
     VariablesSecureApp vars = new VariablesSecureApp(request);
     String targetmenu = getTargetMenu(vars, queryString);
 
+    String hideMenu = vars.getStringParameter("hideMenu", menuFilter);
+
     String textDirection = vars.getSessionValue("#TextDirection", "LTR");
     printPageFrameIdentificacion(response, "../utility/VerticalMenu.html",
         (targetmenu.equals("") ? "../utility/Home.html" : targetmenu),
-        "../utility/VerticalMenu.html?Command=LOADING", textDirection);
+        "../utility/VerticalMenu.html?Command=LOADING", textDirection, 
hideMenu);
   }
 
   private void printPageFrameIdentificacion(HttpServletResponse response, 
String strMenu,
-      String strDetalle, String strMenuLoading, String textDirection) throws 
IOException,
-      ServletException {
+      String strDetalle, String strMenuLoading, String textDirection, String 
hideMenu)
+      throws IOException, ServletException {
     XmlDocument xmlDocument;
     if (textDirection.equals("RTL")) {
       xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/erpCommon/security/Login_FS_RTL")
@@ -72,6 +77,15 @@
       xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/erpCommon/security/Login_FS")
           .createXmlDocument();
     }
+
+    String menuWidth = "true".equals(hideMenu) ? "0" : DEFAULT_MENU_WIDTH;
+
+    String jsConstants = "\nvar isMenuHide = " + "true".equals(hideMenu) + "; 
\n var isRTL = "
+        + "RTL".equals(textDirection) + "; \n var menuWidth = '" + menuWidth
+        + "%';\n var isMenuBlock = " + "true".equals(hideMenu) + ";\n";
+
+    xmlDocument.setParameter("jsConstants", jsConstants);
+    xmlDocument.setParameter("framesetMenu", menuWidth);

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to