From b0aeb3057367b6f43bbc95c8bdae35ab3def5d61 Mon Sep 17 00:00:00 2001 From: rob_k Date: Sun, 8 Jul 2007 04:34:17 +0000 Subject: [PATCH] Correct defect 1749543 - Corrected in WebField, window.css and window.js Correct defect 1748285 - Reversed changes in WFilter and build.xml. Reversed changes Selenium and Joomla integration in index.html abd window.js Updated Calendar10.gif so now visible again in IE6 --- .../servlet/org/compiere/www/WFilter.java | 65 ++------- .../servlet/org/compiere/www/WebField.java | 31 ++-- serverApps/src/web/WEB-INF/web.xml | 33 +---- serverApps/src/web/css/window.css | 8 +- serverApps/src/web/images/Calendar10.gif | Bin 246 -> 382 bytes serverApps/src/web/index.html | 10 +- serverApps/src/web/js/window.js | 137 ++++++++---------- 7 files changed, 106 insertions(+), 178 deletions(-) diff --git a/serverApps/src/main/servlet/org/compiere/www/WFilter.java b/serverApps/src/main/servlet/org/compiere/www/WFilter.java index 786185b846..765f0b223a 100644 --- a/serverApps/src/main/servlet/org/compiere/www/WFilter.java +++ b/serverApps/src/main/servlet/org/compiere/www/WFilter.java @@ -1,28 +1,19 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) 1999 - 2006 Compiere Inc. * - * Copyright (C) Contributors * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Bahman Movaqar (bmovaqar@users.sf.net) * - **********************************************************************/ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ package org.compiere.www; import java.io.*; @@ -99,30 +90,6 @@ public final class WFilter implements javax.servlet.Filter public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - WebSessionCtx wctx = WebSessionCtx.get((HttpServletRequest)request); - if (wctx == null) { - if (m_filterConfig != null) { - String login_page = m_filterConfig.getInitParameter("LoginServlet"); - if (login_page != null && !"".equals(login_page)) { - m_filterConfig.getServletContext().getRequestDispatcher(login_page).forward(request, response); - return; - } - } - throw new ServletException("Unauthorized access, unable to forward to login page"); - } - - String sessionID = wctx.ctx.getProperty("#AD_Session_ID"); - if (sessionID == null) { - if (m_filterConfig != null) { - String login_page = m_filterConfig.getInitParameter("LoginServlet"); - if (login_page != null && !"".equals(login_page)) { - m_filterConfig.getServletContext().getRequestDispatcher(login_page).forward(request, response); - return; - } - } - throw new ServletException("Unauthorized access, unable to forward to login page"); - } - // Get URI String uri = ""; if (request instanceof HttpServletRequest) diff --git a/serverApps/src/main/servlet/org/compiere/www/WebField.java b/serverApps/src/main/servlet/org/compiere/www/WebField.java index 694bef3f6f..2e0ac6764e 100644 --- a/serverApps/src/main/servlet/org/compiere/www/WebField.java +++ b/serverApps/src/main/servlet/org/compiere/www/WebField.java @@ -482,7 +482,7 @@ public class WebField buttonFlyout = new a("#", ""); buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0)); buttonFlyout.setID(m_columnName + "PV"); - buttonFlyout.setOnMouseOver("dropdownmenu(this, event, menu1["+m_fieldNumber+"], '165px')"); + buttonFlyout.setOnMouseOver("dropdownmenu(this, event, 'menu1["+m_fieldNumber+"]')"); buttonFlyout.setOnMouseOut("delayhidemenu()"); } } @@ -498,12 +498,14 @@ public class WebField // if(m_Field != null) { - + div popup = new div(menu); + popup.setClass("anylinkcss"); + popup.setID("menu1["+m_fieldNumber+"]"); return createTD(hidden) .addElement(display) .addElement(button) .addElement(buttonFlyout) - .addElement(new script(menu)); + .addElement(popup); } else { @@ -618,12 +620,15 @@ public class WebField buttonFlyout = new a("#", ""); buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0)); buttonFlyout.setID(m_columnName + "PV"); - buttonFlyout.setOnMouseOver("dropdownmenu(this, event, menu1["+m_fieldNumber+"], '165px')"); + buttonFlyout.setOnMouseOver("dropdownmenu(this, event, 'menu1["+m_fieldNumber+"]')"); buttonFlyout.setOnMouseOut("delayhidemenu()");} } // - return createTD(sel).addElement(buttonFlyout).addElement(new script(menu)); + div popup = new div(menu); + popup.setClass("anylinkcss"); + popup.setID("menu1["+m_fieldNumber+"]"); + return createTD(sel).addElement(buttonFlyout).addElement(popup); } // getSelectField /** @@ -750,11 +755,11 @@ public class WebField // Add by Rob Klein 6/6/2007 buttonValuePref = new a("#", (new img(WebEnv.getImageDirectory("vPreference10.gif")).setBorder(0))+" Preference"); buttonValuePref.setID(m_columnName + "PV"); - buttonValuePref.setOnClick("startValuePref('" + m_displayType + "', '"+Util.maskHTML(m_dataDisplay.toString())+ "', '" - + m_Field.getValue()+ "', '"+m_Field.getHeader()+ "', '"+m_Field.getColumnName()+ "', '" - + Env.getAD_User_ID(m_wsc.ctx)+ "', '" + Env.getAD_Org_ID(m_wsc.ctx) + "', '"+Env.getAD_Client_ID(m_wsc.ctx) - + "', '"+m_Field.getAD_Window_ID()+"');return false;"); - menu = "menu1["+m_fieldNumber+"]="+buttonValuePref+";\n"; + buttonValuePref.setOnClick("startValuePref(" + m_displayType + ", '"+Util.maskHTML(m_dataDisplay.toString())+ "', '" + + m_Field.getValue()+ "', '"+m_Field.getHeader()+ "', '"+m_Field.getColumnName()+ "', " + + Env.getAD_User_ID(m_wsc.ctx)+ ", " + Env.getAD_Org_ID(m_wsc.ctx) + ", "+Env.getAD_Client_ID(m_wsc.ctx) + + ", "+m_Field.getAD_Window_ID()+");return false;"); + menu = ""+buttonValuePref+" \n"; } //Set Zoom @@ -783,11 +788,11 @@ public class WebField if(tableAccess==true){ buttonZoom = new a("#", (new img(WebEnv.getImageDirectory("Zoom10.gif")).setBorder(0))+" Zoom"); buttonZoom.setID(m_columnName + "Z"); - buttonZoom.setOnClick("startZoom('" + tableID + "', "+recordID+");return false;"); + buttonZoom.setOnClick("startZoom(" + tableID + ", "+recordID+");return false;"); if(m_dataDisplay!=null) - menu = menu + "menu1["+m_fieldNumber+"]+="+buttonZoom+";\n"; + menu = menu + ""+buttonZoom+"\n"; else - menu = "menu1["+m_fieldNumber+"]="+buttonZoom+";\n"; + menu = ""+buttonZoom+"\n"; } return menu; diff --git a/serverApps/src/web/WEB-INF/web.xml b/serverApps/src/web/WEB-INF/web.xml index d0f5eb474a..028b58ea73 100644 --- a/serverApps/src/web/WEB-INF/web.xml +++ b/serverApps/src/web/WEB-INF/web.xml @@ -1,31 +1,4 @@ - - + Timing Y - - - LoginServlet - /WLogin diff --git a/serverApps/src/web/css/window.css b/serverApps/src/web/css/window.css index 72a81b1e0a..c707a8268b 100644 --- a/serverApps/src/web/css/window.css +++ b/serverApps/src/web/css/window.css @@ -188,7 +188,8 @@ td.toolbar { border-bottom: 1px solid #000000; } -#dropmenudiv{ +.anylinkcss{ +width: 165px; position: absolute; background-color: white; border:1px solid #003FAF; @@ -198,14 +199,13 @@ z-index: 100; visibility: hidden; } -#dropmenudiv a{ +.anylinkcss a{ text-decoration: none; padding-left: 6px; color: black; display: block; - } -#dropmenudiv a:hover{ /*hover background color*/ +.anylinkcss a:hover{ /*hover background color*/ background-color: #C9D9F5; } diff --git a/serverApps/src/web/images/Calendar10.gif b/serverApps/src/web/images/Calendar10.gif index 322f5035ebd8d614fe15d9b1cc1ed2050b149b9d..58dc763f6425a08a8c877f6da8a0aa79d3ea0629 100644 GIT binary patch literal 382 zcmV-^0fGLBP)0QSF5birYFtb#tAj&hacv`(jmDWYWdLF- zibJh2QQ!P|!+T=(OxL!DWBy59)h}7Lo+#TMj;FWLSy`5U!g>4vFi`+`p0nLHrsu1=nfgA*D4U)snp@%(>=|NsAkjR8>y4jcgUl>`MC7+g6gTF#s~a{`dg yo>Dy'); d.writeln(''); @@ -301,7 +305,7 @@ function startValuePref(displayType, displayData, value, attributedisplay, attri "&Value="+value+"&DisplayAtrribute="+attributedisplay+"&Attribute="+attribute+ "&AD_User_ID="+userID+"&AD_Org_ID="+orgID+"&AD_Client_ID="+clientID+"&AD_Window_ID="+windowID; //alert(url); - return popUp(url,attributedisplay); + return popUp(url,attribute); } // startValuePref /**************************************************************************** @@ -423,25 +427,20 @@ var DAY = 24 * HOUR; var WEEK = 7 * DAY; /*********************************************** -* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com) +* AnyLink CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use -* Visit http://www.dynamicdrive.com/ for full source code +* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ -//Contents for menu 1 -var menu1=new Array() - -var disappeardelay=200 //menu disappear speed onMouseout (in miliseconds) -var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value) +var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds) +var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d) +var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no) /////No further editting needed -var ie4=document.all +var ie5=document.all var ns6=document.getElementById&&!document.all -if (ie4||ns6) -document.write('') - function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; @@ -452,12 +451,9 @@ parentEl=parentEl.offsetParent; return totaloffset; } - -function showhide(obj, e, visible, hidden, menuwidth){ -if (ie4||ns6) +function showhide(obj, e, visible, hidden){ +if (ie5||ns6) dropmenuobj.style.left=dropmenuobj.style.top=-500 -dropmenuobj.widthobj=dropmenuobj.style -dropmenuobj.widthobj.width=menuwidth if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") @@ -471,50 +467,47 @@ return (document.compatMode && document.compatMode!="BackCompat")? document.docu function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ -var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 +var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth -if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure) -edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth +if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) +edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth } else{ -var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset -var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 +var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset +var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight -if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up? -edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight -if ((dropmenuobj.y-topedge)