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
This commit is contained in:
rob_k 2007-07-08 04:34:17 +00:00
parent 27aa94bc35
commit b0aeb30573
7 changed files with 106 additions and 178 deletions

View File

@ -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)

View File

@ -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;

View File

@ -1,31 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
**********************************************************************
* 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) *
**********************************************************************
-->
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Jorg Janke (ComPiere, Inc.) -->
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -48,10 +21,6 @@
<init-param>
<param-name>Timing</param-name>
<param-value>Y</param-value>
</init-param>
<init-param>
<param-name>LoginServlet</param-name>
<param-value>/WLogin</param-value>
</init-param>
</filter>
<filter-mapping>

View File

@ -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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 382 B

View File

@ -11,11 +11,11 @@
function resizeFrame(value){
if (!top.WCmd) // no cmd frame
var frame = top.myiframe.document;
else
var frame = top.document;
//var frame = top.document;
//if (!top.WCmd) // no cmd frame
//var frame = top.myiframe.document;
//else
//var frame = top.document;
var frame = top.document;
var frameset = frame.getElementById("framesetMenuWindow");
if (!frameset) return false;

View File

@ -19,19 +19,20 @@ var deleteText = "ConfirmDelete";
function fieldUpdate(e)
{
if (!top.WCmd){ // no cmd frame
if (!top.myiframe.WCmd){
if (!top.WCmd) //{ no cmd frame
return;
}
else{
var d = top.myiframe.WCmd.document;
var path = "top.myiframe.";
}
}
else{
// if (!top.myiframe.WCmd){
// return;
// }
// else{
// var d = top.myiframe.WCmd.document;
// var path = "top.myiframe.";
// }
//}
//else{
var d = top.WCmd.document;
var path = "top.";
}
//}
//if (!e) e = window.event;
@ -39,7 +40,8 @@ function fieldUpdate(e)
// update info and submit
//var d = top.WCmd.document;
//alert("field Name "+e.name+" Field Value "+e.value);
//alert("field Name "+e.name+" Field Value "+e.value);
d.fieldUpdate.formName.value = e.form.name; //e.document.forms[0].name;
d.fieldUpdate.fieldName.value = e.name;
d.fieldUpdate.fieldValue.value = e.value;
@ -53,21 +55,23 @@ function fieldUpdate(e)
function createWCmd()
{
if (!top.WCmd){ // no cmd frame
if (!top.myiframe.WCmd){
return;
}
else{
var d = top.myiframe.WCmd.document;
var path = "top.myiframe.";
}
}
else{
if (!top.WCmd) //{ no cmd frame
return;
// if (!top.myiframe.WCmd){
// return;
// }
// else{
// var d = top.myiframe.WCmd.document;
// var path = "top.myiframe.";
// }
//}
//else{
var d = top.WCmd.document;
var path = "top.";
}
//}
// write to the command window.
d.open();
d.writeln('<form name="fieldUpdate" method="post" action="/adempiere/WFieldUpdate">');
d.writeln('<input type="hidden" name="formName" value="x">');
@ -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('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
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)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what
}
function dropdownmenu(obj, e, menucontents, menuwidth){
function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
function clickreturnvalue(){
if (ie4||ns6) return false
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}
@ -526,22 +519,14 @@ return false;
}
function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}
function clearhidemenu(){
@ -549,3 +534,5 @@ if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}