summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: adb9134)
raw | patch | inline | side by side (parent: adb9134)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Jul 2008 10:16:24 +0000 (10:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Jul 2008 10:16:24 +0000 (10:16 +0000) |
Opera caused undefined browserType attribute. -> Dialogs couldn't be closed.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11522 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11522 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/include/focus.js | patch | blob | history |
index 796798fb486f9b8dc15b4d5d69b765f661b02d47..843a0a123b419fbb006becf2c5b919a505368ab6 100644 (file)
-var browserType;
+var browserType = "Not dectected, adjust focus.js";
var firefoxType;
-if (document.layers) {browserType = "nn4"}
-if (document.all) {browserType = "ie"}
-if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
-if (browserType=="gecko" && window.navigator.userAgent.toLowerCase().match("firefox\/2")) {firefoxType= "firefox2"}
-else {firefoxType= "firefox"};
+if (document.layers)
+{
+ browserType = "nn4";
+}
+
+if (document.all)
+{
+ browserType = "ie";
+}
+
+if (window.navigator.userAgent.toLowerCase().match("gecko"))
+{
+ browserType= "gecko";
+}
+
+if (window.navigator.userAgent.toLowerCase().match(/opera/i))
+{
+ browserType= "gecko";
+}
+
+if (browserType=="gecko" && window.navigator.userAgent.toLowerCase().match("firefox\/2"))
+{
+ firefoxType= "firefox2";
+}else{
+ firefoxType= "firefox";
+}
netscape = "";
ver= navigator.appVersion; len = ver.length;