Code

Updated toggle method
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 13:43:45 +0000 (13:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 13:43:45 +0000 (13:43 +0000)
-We should replace GOsa_toggle with Protype style $(element).toggle.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15543 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/include/gosa.js

index db3079b7c022bd89ad55d79674c94975cecd3087..eec7609e9daef96c1f68f6a3289bc3b74f3fa73b 100644 (file)
@@ -222,18 +222,7 @@ if (Prototype.Browser.Gecko){
 }
 
 function GOsa_toggle(element) {
-       if (Prototype.Browser.Gecko)
-               document.poppedLayer = document.getElementById(element);
-       else if (Prototype.Browser.IE)
-               document.poppedLayer = document.all[element];
-       else
-               document.poppedLayer = document.layers[element];
-
-       if (document.poppedLayer.style.visibility == "visible") {
-                $(element).hide();
-       } else {
-                $(element).show();
-       }
+       $(element).toggle();
 }
 
 function popup(target, name) {