Project

General

Profile

Bug #16141 ยป ie5.diff

Administrator Admin, 2006-05-31 19:36

View differences:

alt_main.php (working copy)
$pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
$this->mainJScode='
//browsercheck...
function GL_checkBrowser(){ //
this.dom= (document.getElementById);
this.op= (navigator.userAgent.indexOf("Opera")>-1);
this.op7= this.op && (navigator.appVersion.indexOf("7")>-1); // check for Opera version 7
this.konq= (navigator.userAgent.indexOf("Konq")>-1);
this.ie4= (document.all && !this.dom && !this.op && !this.konq);
this.ie5= (document.all && this.dom && !this.op && !this.konq);
this.ns4= (document.layers && !this.dom && !this.konq);
this.ns5= (!document.all && this.dom && !this.op && !this.konq);
this.ns6= (this.ns5);
this.bw= (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
return this;
}
bw= new GL_checkBrowser();
/**
* Function similar to PHPs rawurlencode();
*/
......
var HLclass = mainModule ? "c-mainitem-HL" : "c-subitem-HL";
}
if (bw.ie5) {
var classNameLabel = "className";
} else {
var classNameLabel = "class";
}
if (docObj) {
// Reset old:
if (currentlyHighLightedId && docObj.getElementById(currentlyHighLightedId)) {
docObj.getElementById(currentlyHighLightedId).attributes.getNamedItem("class").nodeValue = currentlyHighLighted_restoreValue;
docObj.getElementById(currentlyHighLightedId).setAttribute(classNameLabel, currentlyHighLighted_restoreValue);
}
// Set new:
currentlyHighLightedId = trId;
if (currentlyHighLightedId && docObj.getElementById(currentlyHighLightedId)) {
var classAttribObject = docObj.getElementById(currentlyHighLightedId).attributes.getNamedItem("class");
currentlyHighLighted_restoreValue = classAttribObject.nodeValue;
classAttribObject.nodeValue = HLclass;
currentlyHighLighted_restoreValue = docObj.getElementById(currentlyHighLightedId).getAttribute(classNameLabel);
docObj.getElementById(currentlyHighLightedId).setAttribute(classNameLabel, HLclass);
}
}
}
template.php (working copy)
var DTM_array = new Array();
var DTM_origClass = new String();
function GL_checkBrowser(){ //
this.dom= (document.getElementById);
this.op= (navigator.userAgent.indexOf("Opera")>-1);
this.op7= this.op && (navigator.appVersion.indexOf("7")>-1); // check for Opera version 7
this.konq= (navigator.userAgent.indexOf("Konq")>-1);
this.ie4= (document.all && !this.dom && !this.op && !this.konq);
this.ie5= (document.all && this.dom && !this.op && !this.konq);
this.ns4= (document.layers && !this.dom && !this.konq);
this.ns5= (!document.all && this.dom && !this.op && !this.konq);
this.ns6= (this.ns5);
this.bw= (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
return this;
}
bw= new GL_checkBrowser();
if (bw.ie5) {
var classNameLabel = "className";
} else {
var classNameLabel = "class";
}
// if tabs are used in a popup window the array might not exists
if(!top.DTM_currentTabs) {
top.DTM_currentTabs = new Array();
......
for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++) {
if (DTM_array[idBase][cnt] != idBase+"-"+index) {
document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none";
document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
document.getElementById(DTM_array[idBase][cnt]+"-MENU").setAttribute(classNameLabel, "tab");
}
}
}
......
if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
if(DTM_origClass=="") {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tab");
} else {
DTM_origClass = "tab";
}
......
} else {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
if(DTM_origClass=="") {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tabact");
} else {
DTM_origClass = "tabact";
}
......
if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tab");
} else {
DTM_origClass = "tab";
}
......
} else {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tabact");
} else {
DTM_origClass = "tabact";
}
......
}
function DTM_mouseOver(obj) { //
DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue;
obj.attributes.getNamedItem(\'class\').nodeValue += "_over";
DTM_origClass = obj.getAttribute(classNameLabel);
obj.setAttribute(classNameLabel, DTM_origClass+"_over");
}
function DTM_mouseOut(obj) { //
obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass;
obj.setAttribute(classNameLabel, DTM_origClass);
DTM_origClass = "";
}
    (1-1/1)