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:
parent
27aa94bc35
commit
b0aeb30573
|
@ -1,28 +1,19 @@
|
||||||
/**********************************************************************
|
/******************************************************************************
|
||||||
* This file is part of Adempiere ERP Bazaar *
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
* http://www.adempiere.org *
|
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||||
* *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* Copyright (C) 1999 - 2006 Compiere Inc. *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* Copyright (C) Contributors *
|
* 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 *
|
||||||
* This program is free software; you can redistribute it and/or *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* modify it under the terms of the GNU General Public License *
|
* See the GNU General Public License for more details. *
|
||||||
* as published by the Free Software Foundation; either version 2 *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* of the License, or (at your option) any later version. *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
* 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) *
|
|
||||||
**********************************************************************/
|
|
||||||
package org.compiere.www;
|
package org.compiere.www;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -99,30 +90,6 @@ public final class WFilter implements javax.servlet.Filter
|
||||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
throws IOException, ServletException
|
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
|
// Get URI
|
||||||
String uri = "";
|
String uri = "";
|
||||||
if (request instanceof HttpServletRequest)
|
if (request instanceof HttpServletRequest)
|
||||||
|
|
|
@ -482,7 +482,7 @@ public class WebField
|
||||||
buttonFlyout = new a("#", "");
|
buttonFlyout = new a("#", "");
|
||||||
buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0));
|
buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0));
|
||||||
buttonFlyout.setID(m_columnName + "PV");
|
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()");
|
buttonFlyout.setOnMouseOut("delayhidemenu()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -498,12 +498,14 @@ public class WebField
|
||||||
//
|
//
|
||||||
if(m_Field != null)
|
if(m_Field != null)
|
||||||
{
|
{
|
||||||
|
div popup = new div(menu);
|
||||||
|
popup.setClass("anylinkcss");
|
||||||
|
popup.setID("menu1["+m_fieldNumber+"]");
|
||||||
return createTD(hidden)
|
return createTD(hidden)
|
||||||
.addElement(display)
|
.addElement(display)
|
||||||
.addElement(button)
|
.addElement(button)
|
||||||
.addElement(buttonFlyout)
|
.addElement(buttonFlyout)
|
||||||
.addElement(new script(menu));
|
.addElement(popup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -618,12 +620,15 @@ public class WebField
|
||||||
buttonFlyout = new a("#", "");
|
buttonFlyout = new a("#", "");
|
||||||
buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0));
|
buttonFlyout.addElement(new img(WebEnv.getImageDirectory("menufly10.gif")).setBorder(0));
|
||||||
buttonFlyout.setID(m_columnName + "PV");
|
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()");}
|
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
|
} // getSelectField
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -750,11 +755,11 @@ public class WebField
|
||||||
// Add by Rob Klein 6/6/2007
|
// Add by Rob Klein 6/6/2007
|
||||||
buttonValuePref = new a("#", (new img(WebEnv.getImageDirectory("vPreference10.gif")).setBorder(0))+" Preference");
|
buttonValuePref = new a("#", (new img(WebEnv.getImageDirectory("vPreference10.gif")).setBorder(0))+" Preference");
|
||||||
buttonValuePref.setID(m_columnName + "PV");
|
buttonValuePref.setID(m_columnName + "PV");
|
||||||
buttonValuePref.setOnClick("startValuePref('" + m_displayType + "', '"+Util.maskHTML(m_dataDisplay.toString())+ "', '"
|
buttonValuePref.setOnClick("startValuePref(" + m_displayType + ", '"+Util.maskHTML(m_dataDisplay.toString())+ "', '"
|
||||||
+ m_Field.getValue()+ "', '"+m_Field.getHeader()+ "', '"+m_Field.getColumnName()+ "', '"
|
+ 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)
|
+ 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;");
|
+ ", "+m_Field.getAD_Window_ID()+");return false;");
|
||||||
menu = "menu1["+m_fieldNumber+"]="+buttonValuePref+";\n";
|
menu = ""+buttonValuePref+" \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set Zoom
|
//Set Zoom
|
||||||
|
@ -783,11 +788,11 @@ public class WebField
|
||||||
if(tableAccess==true){
|
if(tableAccess==true){
|
||||||
buttonZoom = new a("#", (new img(WebEnv.getImageDirectory("Zoom10.gif")).setBorder(0))+" Zoom");
|
buttonZoom = new a("#", (new img(WebEnv.getImageDirectory("Zoom10.gif")).setBorder(0))+" Zoom");
|
||||||
buttonZoom.setID(m_columnName + "Z");
|
buttonZoom.setID(m_columnName + "Z");
|
||||||
buttonZoom.setOnClick("startZoom('" + tableID + "', "+recordID+");return false;");
|
buttonZoom.setOnClick("startZoom(" + tableID + ", "+recordID+");return false;");
|
||||||
if(m_dataDisplay!=null)
|
if(m_dataDisplay!=null)
|
||||||
menu = menu + "menu1["+m_fieldNumber+"]+="+buttonZoom+";\n";
|
menu = menu + ""+buttonZoom+"\n";
|
||||||
else
|
else
|
||||||
menu = "menu1["+m_fieldNumber+"]="+buttonZoom+";\n";
|
menu = ""+buttonZoom+"\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
return menu;
|
return menu;
|
||||||
|
|
|
@ -1,31 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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) *
|
|
||||||
**********************************************************************
|
|
||||||
-->
|
|
||||||
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Jorg Janke (ComPiere, Inc.) -->
|
<!-- 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"
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
@ -49,10 +22,6 @@
|
||||||
<param-name>Timing</param-name>
|
<param-name>Timing</param-name>
|
||||||
<param-value>Y</param-value>
|
<param-value>Y</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<init-param>
|
|
||||||
<param-name>LoginServlet</param-name>
|
|
||||||
<param-value>/WLogin</param-value>
|
|
||||||
</init-param>
|
|
||||||
</filter>
|
</filter>
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>WFilter</filter-name>
|
<filter-name>WFilter</filter-name>
|
||||||
|
|
|
@ -188,7 +188,8 @@ td.toolbar {
|
||||||
border-bottom: 1px solid #000000;
|
border-bottom: 1px solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropmenudiv{
|
.anylinkcss{
|
||||||
|
width: 165px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border:1px solid #003FAF;
|
border:1px solid #003FAF;
|
||||||
|
@ -198,14 +199,13 @@ z-index: 100;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropmenudiv a{
|
.anylinkcss a{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
color: black;
|
color: black;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropmenudiv a:hover{ /*hover background color*/
|
.anylinkcss a:hover{ /*hover background color*/
|
||||||
background-color: #C9D9F5;
|
background-color: #C9D9F5;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 382 B |
|
@ -11,11 +11,11 @@
|
||||||
function resizeFrame(value){
|
function resizeFrame(value){
|
||||||
|
|
||||||
|
|
||||||
if (!top.WCmd) // no cmd frame
|
//if (!top.WCmd) // no cmd frame
|
||||||
var frame = top.myiframe.document;
|
//var frame = top.myiframe.document;
|
||||||
else
|
//else
|
||||||
var frame = top.document;
|
|
||||||
//var frame = top.document;
|
//var frame = top.document;
|
||||||
|
var frame = top.document;
|
||||||
|
|
||||||
var frameset = frame.getElementById("framesetMenuWindow");
|
var frameset = frame.getElementById("framesetMenuWindow");
|
||||||
if (!frameset) return false;
|
if (!frameset) return false;
|
||||||
|
|
|
@ -19,19 +19,20 @@ var deleteText = "ConfirmDelete";
|
||||||
function fieldUpdate(e)
|
function fieldUpdate(e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!top.WCmd){ // no cmd frame
|
if (!top.WCmd) //{ no cmd frame
|
||||||
if (!top.myiframe.WCmd){
|
|
||||||
return;
|
return;
|
||||||
}
|
// if (!top.myiframe.WCmd){
|
||||||
else{
|
// return;
|
||||||
var d = top.myiframe.WCmd.document;
|
// }
|
||||||
var path = "top.myiframe.";
|
// else{
|
||||||
}
|
// var d = top.myiframe.WCmd.document;
|
||||||
}
|
// var path = "top.myiframe.";
|
||||||
else{
|
// }
|
||||||
|
//}
|
||||||
|
//else{
|
||||||
var d = top.WCmd.document;
|
var d = top.WCmd.document;
|
||||||
var path = "top.";
|
var path = "top.";
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
//if (!e) e = window.event;
|
//if (!e) e = window.event;
|
||||||
|
@ -40,6 +41,7 @@ function fieldUpdate(e)
|
||||||
// update info and submit
|
// update info and submit
|
||||||
//var d = top.WCmd.document;
|
//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.formName.value = e.form.name; //e.document.forms[0].name;
|
||||||
d.fieldUpdate.fieldName.value = e.name;
|
d.fieldUpdate.fieldName.value = e.name;
|
||||||
d.fieldUpdate.fieldValue.value = e.value;
|
d.fieldUpdate.fieldValue.value = e.value;
|
||||||
|
@ -53,21 +55,23 @@ function fieldUpdate(e)
|
||||||
function createWCmd()
|
function createWCmd()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!top.WCmd){ // no cmd frame
|
if (!top.WCmd) //{ no cmd frame
|
||||||
if (!top.myiframe.WCmd){
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
else{
|
// if (!top.myiframe.WCmd){
|
||||||
var d = top.myiframe.WCmd.document;
|
// return;
|
||||||
var path = "top.myiframe.";
|
// }
|
||||||
}
|
// else{
|
||||||
}
|
// var d = top.myiframe.WCmd.document;
|
||||||
else{
|
// var path = "top.myiframe.";
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//else{
|
||||||
var d = top.WCmd.document;
|
var d = top.WCmd.document;
|
||||||
var path = "top.";
|
var path = "top.";
|
||||||
}
|
//}
|
||||||
|
|
||||||
// write to the command window.
|
// write to the command window.
|
||||||
|
|
||||||
d.open();
|
d.open();
|
||||||
d.writeln('<form name="fieldUpdate" method="post" action="/adempiere/WFieldUpdate">');
|
d.writeln('<form name="fieldUpdate" method="post" action="/adempiere/WFieldUpdate">');
|
||||||
d.writeln('<input type="hidden" name="formName" value="x">');
|
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+
|
"&Value="+value+"&DisplayAtrribute="+attributedisplay+"&Attribute="+attribute+
|
||||||
"&AD_User_ID="+userID+"&AD_Org_ID="+orgID+"&AD_Client_ID="+clientID+"&AD_Window_ID="+windowID;
|
"&AD_User_ID="+userID+"&AD_Org_ID="+orgID+"&AD_Client_ID="+clientID+"&AD_Window_ID="+windowID;
|
||||||
//alert(url);
|
//alert(url);
|
||||||
return popUp(url,attributedisplay);
|
return popUp(url,attribute);
|
||||||
|
|
||||||
} // startValuePref
|
} // startValuePref
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -423,25 +427,20 @@ var DAY = 24 * HOUR;
|
||||||
var WEEK = 7 * DAY;
|
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
|
* 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 disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
|
||||||
var menu1=new Array()
|
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)
|
||||||
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)
|
|
||||||
|
|
||||||
/////No further editting needed
|
/////No further editting needed
|
||||||
|
|
||||||
var ie4=document.all
|
var ie5=document.all
|
||||||
var ns6=document.getElementById&&!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){
|
function getposOffset(what, offsettype){
|
||||||
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
|
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
|
||||||
var parentEl=what.offsetParent;
|
var parentEl=what.offsetParent;
|
||||||
|
@ -452,12 +451,9 @@ parentEl=parentEl.offsetParent;
|
||||||
return totaloffset;
|
return totaloffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showhide(obj, e, visible, hidden){
|
||||||
function showhide(obj, e, visible, hidden, menuwidth){
|
if (ie5||ns6)
|
||||||
if (ie4||ns6)
|
|
||||||
dropmenuobj.style.left=dropmenuobj.style.top=-500
|
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")
|
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
|
||||||
obj.visibility=visible
|
obj.visibility=visible
|
||||||
else if (e.type=="click")
|
else if (e.type=="click")
|
||||||
|
@ -471,50 +467,47 @@ return (document.compatMode && document.compatMode!="BackCompat")? document.docu
|
||||||
function clearbrowseredge(obj, whichedge){
|
function clearbrowseredge(obj, whichedge){
|
||||||
var edgeoffset=0
|
var edgeoffset=0
|
||||||
if (whichedge=="rightedge"){
|
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
|
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
|
||||||
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
|
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
|
||||||
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
|
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
|
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
|
||||||
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
|
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
|
||||||
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
|
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
|
||||||
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
|
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
|
||||||
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
|
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
|
||||||
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
|
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
|
||||||
edgeoffset=dropmenuobj.y
|
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return edgeoffset
|
return edgeoffset
|
||||||
}
|
}
|
||||||
|
|
||||||
function populatemenu(what){
|
function dropdownmenu(obj, e, dropmenuID){
|
||||||
if (ie4||ns6)
|
|
||||||
dropmenuobj.innerHTML=what
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function dropdownmenu(obj, e, menucontents, menuwidth){
|
|
||||||
if (window.event) event.cancelBubble=true
|
if (window.event) event.cancelBubble=true
|
||||||
else if (e.stopPropagation) e.stopPropagation()
|
else if (e.stopPropagation) e.stopPropagation()
|
||||||
|
if (typeof dropmenuobj!="undefined") //hide previous menu
|
||||||
|
dropmenuobj.style.visibility="hidden"
|
||||||
clearhidemenu()
|
clearhidemenu()
|
||||||
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
|
if (ie5||ns6){
|
||||||
populatemenu(menucontents)
|
obj.onmouseout=delayhidemenu
|
||||||
|
dropmenuobj=document.getElementById(dropmenuID)
|
||||||
if (ie4||ns6){
|
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
|
||||||
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
|
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.x=getposOffset(obj, "left")
|
||||||
dropmenuobj.y=getposOffset(obj, "top")
|
dropmenuobj.y=getposOffset(obj, "top")
|
||||||
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
|
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
|
||||||
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
|
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
|
||||||
}
|
}
|
||||||
|
|
||||||
return clickreturnvalue()
|
return clickreturnvalue()
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickreturnvalue(){
|
function clickreturnvalue(){
|
||||||
if (ie4||ns6) return false
|
if ((ie5||ns6) && !enableanchorlink) return false
|
||||||
else return true
|
else return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,22 +519,14 @@ return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dynamichide(e){
|
function dynamichide(e){
|
||||||
if (ie4&&!dropmenuobj.contains(e.toElement))
|
if (ie5&&!dropmenuobj.contains(e.toElement))
|
||||||
delayhidemenu()
|
delayhidemenu()
|
||||||
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
|
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
|
||||||
delayhidemenu()
|
delayhidemenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidemenu(e){
|
|
||||||
if (typeof dropmenuobj!="undefined"){
|
|
||||||
if (ie4||ns6)
|
|
||||||
dropmenuobj.style.visibility="hidden"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function delayhidemenu(){
|
function delayhidemenu(){
|
||||||
if (ie4||ns6)
|
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
|
||||||
delayhide=setTimeout("hidemenu()",disappeardelay)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearhidemenu(){
|
function clearhidemenu(){
|
||||||
|
@ -549,3 +534,5 @@ if (typeof delayhide!="undefined")
|
||||||
clearTimeout(delayhide)
|
clearTimeout(delayhide)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue