diff --git a/ChangeLog b/ChangeLog index fd23d81c8..9dd1613dd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ $Source$ Use common header. * libraries/header_meta_style.inc.php: Add support for defining page title. + * libraries/left.js, libraries/header_meta_style.inc.php: Move browser + detection to only place where it is currently used. 2005-10-13 Sebastian Mendel * left.php: preselect db if only one db diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php index 8ce3e52b1..df958e26b 100644 --- a/libraries/header_meta_style.inc.php +++ b/libraries/header_meta_style.inc.php @@ -36,38 +36,5 @@ if (!empty($GLOBALS['cfg']['PmaAbsoluteUri'])) { echo '' . "\n"; } ?> - diff --git a/libraries/left.js b/libraries/left.js index c6f0679cd..f7a805966 100644 --- a/libraries/left.js +++ b/libraries/left.js @@ -36,6 +36,36 @@ var imgClosed = new Image(9,9); imgClosed.src = imgUrlPlus; +/* + * we need this for Backwards-Compatibility and resolving problems + * with non DOM browsers, which may have problems with css 2 (like NC 4) + */ +var isDOM = (typeof(document.getElementsByTagName) != 'undefined' + && typeof(document.createElement) != 'undefined') + ? 1 : 0; +var isIE4 = (typeof(document.all) != 'undefined' + && parseInt(navigator.appVersion) >= 4) + ? 1 : 0; +var isNS4 = (typeof(document.layers) != 'undefined') + ? 1 : 0; +var capable = (isDOM || isIE4 || isNS4) + ? 1 : 0; +// Ugly fix for Opera and Konqueror 2.2 that are half DOM compliant +if (capable) { + if (typeof(window.opera) != 'undefined') { + var browserName = ' ' + navigator.userAgent.toLowerCase(); + if ((browserName.indexOf('konqueror 7') == 0)) { + capable = 0; + } + } else if (typeof(navigator.userAgent) != 'undefined') { + var browserName = ' ' + navigator.userAgent.toLowerCase(); + if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) { + capable = 0; + } + } // end if... else if... +} // end if + + /** * Do reloads the frame if the window has been resized under Netscape4+ *