From: Stephan Köhler Date: Mon, 27 Feb 2006 14:24:36 +0000 (+0000) Subject: Bugfix 301, neue Menu funktionierte nicht mit Opera 8.52 und Konqueror 3.5.0 X-Git-Tag: release-2.4.0^2~317 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d9e3960069a4283e566f53b37a0524dfcdd3e663;p=kivitendo-erp.git Bugfix 301, neue Menu funktionierte nicht mit Opera 8.52 und Konqueror 3.5.0 Beim Konqueror 3.2.2 ist das Problem noch nicht behoben --- diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl index 57b2e028d..9f88f0b7e 100644 --- a/bin/mozilla/menunew.pl +++ b/bin/mozilla/menunew.pl @@ -52,7 +52,7 @@ sub display { &acc_menu; print qq| - @@ -175,6 +175,8 @@ sub acc_menu { var isDOM = (document.getElementById ? true : false); var isIE4 = ((document.all && !isDOM) ? true : false); var isNS4 = (document.layers ? true : false); +//var KO = (navigator.appName=="Konqueror" \|\| navigator.appName=="Opera") ; +var KO = ((navigator.userAgent.indexOf('Opera',0) != -1) \|\| (navigator.userAgent.indexOf('Konqueror',0) != -1)); function getRef(id) { if (isDOM) return document.getElementById(id); if (isIE4) return document.all[id]; @@ -186,6 +188,7 @@ function getSty(id) { var popTimer = 0; var litNow = new Array(); function popOver(menuNum, itemNum) { + if (KO) document.getElementById("win1").style.visibility = "hidden"; clearTimeout(popTimer); hideAllBut(menuNum); litNow = getTree(menuNum, itemNum); @@ -204,6 +207,7 @@ function popOver(menuNum, itemNum) { function popOut(menuNum, itemNum) { if ((menuNum == 0) && !menu[menuNum][itemNum].target) hideAllBut(0) + if (KO) document.getElementById("win1").style.visibility = "visible"; else popTimer = setTimeout('hideAllBut(0)', 500); } @@ -234,6 +238,7 @@ function hideAllBut(menuNum) { menu[count][0].ref.visibility = 'hidden'; changeCol(litNow, false); } + function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) { this.isVert = isVert; this.popInd = popInd @@ -334,6 +339,7 @@ document.onclick = clickHandle; function clickHandle(evt) { if (isNS4) document.routeEvent(evt); hideAllBut(0); + if (KO) document.getElementById("win1").style.visibility = "visible"; } function moveRoot() { with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5); @@ -422,7 +428,7 @@ sub section_menu { qq|menu[0][$mm] = new Item(' $label', '#', '', $breit, 10, $pm); \n|; print qq|menu[$pm] = new Array();\n|; print - qq|menu[$pm][0] = new Menu(true, '>', 0, 22, 180, defOver, defBack, 'itemBorder', 'itemText');\n|; + qq|menu[$pm][0] = new Menu(true, '>', 0, 20, 180, defOver, defBack, 'itemBorder', 'itemText');\n|; #print qq| $label    \n|; §ion_menu($menu, $item);