Code

Fix a couple of js errors
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Jan 2010 12:30:21 +0000 (12:30 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Jan 2010 12:30:21 +0000 (12:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15199 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/include/events.js
gosa-core/html/include/focus.js

index 612f262a3cb9cc2fdb1d38c1e2f49e5df8d88d7b..3b893d2394e102ab076831bdf860a5095090c36f 100644 (file)
@@ -18,5 +18,7 @@ function OnLoad()
 function OnResize()
 {
        adjust();
-       resizeHandler();
+        if(document['resizeHandler']) {
+         resizeHandler();
+        }
 }
index ba5f23ab9f7dfea8a569b3d422e17939b34e5eb1..4222a9f65e10bb729b9fb67fc4dfa92a881380b3 100644 (file)
@@ -421,16 +421,24 @@ function adjust_width(e)
                if(div_width+diff>=space) {
                         if (width - save > space) {
                          document.getElementById('d_scrollbody').style.width=div_width+diff+"px";
-                         document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
+                          if (document.getElementById('t_scrollbody') != null) {
+                           document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
+                          }
        
                          // Resize the Header cells (only the relative-width ones)
-                         document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
+                          if (document.getElementById('t_scrollhead') != null) {
+                           document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
+                          }
                         } else {
                          document.getElementById('d_scrollbody').style.width=div_width+"px";
-                         document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
+                          if (document.getElementById('t_scrollbody') != null) {
+                           document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
+                          }
        
                          // Resize the Header cells (only the relative-width ones)
-                         document.getElementById('t_scrollhead').style.width=div_width+"px";
+                          if (document.getElementById('t_scrollhead') != null) {
+                           document.getElementById('t_scrollhead').style.width=div_width+"px";
+                          }
                         }
 
                // window has been downscaled, we must reset the div to 600px
@@ -438,10 +446,14 @@ function adjust_width(e)
                        // Reset layout (set width to 600px)
                        div_width=space;
                        document.getElementById('d_scrollbody').style.width=div_width+"px";
-                       document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
+                        if (document.getElementById('t_scrollbody') != null) {
+                         document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
+                        }
        
                        // Resize the Header cells (only the relative-width ones)
-                       document.getElementById('t_scrollhead').style.width=div_width+"px";
+                        if (document.getElementById('t_scrollhead') != null) {
+                         document.getElementById('t_scrollhead').style.width=div_width+"px";
+                        }
                }
        } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){
                // Resize the div