nicer codding for Opera exception

This commit is contained in:
Loïc Chapeaux
2001-12-08 08:59:14 +00:00
parent 986054d997
commit a605108a67
2 changed files with 14 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
* left.php3: nicer codding for Opera exception.
2001-12-07 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/polish.inc.php3: fixed typos thanks to Tomasz Regdos & Jakub Wilk.

View File

@@ -75,24 +75,27 @@ if ($num_dbs > 1) {
<script type="text/javascript" language="javascript">
<!--
var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
&& typeof(document.createElement) != 'undefined'
&& typeof(window.opera) == 'undefined')
&& typeof(document.createElement) != 'undefined')
? 1 : 0;
var isIE4 = (typeof(document.all) != 'undefined'
&& parseInt(navigator.appVersion) >= 4
&& typeof(window.opera) == 'undefined')
&& parseInt(navigator.appVersion) >= 4)
? 1 : 0;
var isNS4 = (typeof(document.layers) != 'undefined')
? 1 : 0;
var capable = (isDOM || isIE4 || isNS4)
? 1 : 0;
// Uggly fix for Konqueror 2.2 that is half DOM compliant
if (capable && typeof(navigator.userAgent) != 'undefined') {
var browserName = ' ' + navigator.userAgent.toLowerCase();
if (browserName.indexOf('konqueror') > 0) {
// Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
if (capable) {
if (typeof(window.opera) != 'undefined') {
capable = 0;
}
}
else if (typeof(navigator.userAgent) != 'undefined') {
var browserName = ' ' + navigator.userAgent.toLowerCase();
if (browserName.indexOf('konqueror') > 0) {
capable = 0;
}
} // end if... else if...
} // end if
var fontFamily = '<?php echo $left_font_family; ?>';
var fontSize = '<?php echo $font_size; ?>';
var fontBig = '<?php echo $font_bigger; ?>';
@@ -211,7 +214,7 @@ if ($num_dbs > 1) {
} // end if
// Displays the database name
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (capable) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (capable) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
echo "\n";
echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>';