Code

Updated error handler to display small message, only
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 May 2005 13:38:32 +0000 (13:38 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 May 2005 13:38:32 +0000 (13:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@293 594d385d-05f5-0310-b6e9-bd551577e9d8

TODO
html/include/focus.js
html/index.php
html/main.php
include/class_tabs.inc
include/functions.inc

diff --git a/TODO b/TODO
index 5a1b11351bd024aa4f58f1a8928bce5537132125..4f1c575b46a8df38adeb5764a86f5d00fdadb4a3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,6 +7,8 @@ Things to fix before 2.4:
 
 * Make it "barrierefrei"
 
+* FAX report -> search_result undefined
+
 
 Target for 2.5:
 ===============
index 9802726e682383e22c93cff994fbd2f78e047e3e..48f7e738e4000ec31d06adec95e822ed4efcc60c 100644 (file)
@@ -1,3 +1,9 @@
+var browserType;
+
+if (document.layers) {browserType = "nn4"}
+if (document.all) {browserType = "ie"}
+if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
+
 netscape = "";
 ver= navigator.appVersion; len = ver.length;
 
@@ -38,3 +44,38 @@ if (netscape){
   document.captureEvents(Event.KEYDOWN|Event.KEYUP);
 }
 
+function hide(element) {
+  if (browserType == "gecko" )
+     document.poppedLayer = document.getElementById(element);
+  else if (browserType == "ie")
+     document.poppedLayer = document.all[element];
+  else
+     document.poppedLayer = document.layers[element];
+  document.poppedLayer.style.visibility = "hidden";
+}
+
+function show(element) {
+  if (browserType == "gecko" )
+     document.poppedLayer = document.getElementById(element);
+  else if (browserType == "ie")
+     document.poppedLayer = document.all[element];
+  else
+     document.poppedLayer = document.layers[element];
+  document.poppedLayer.style.visibility = "visible";
+}
+
+function toggle(element) {
+  if (browserType == "gecko" )
+     document.poppedLayer = document.getElementById(element);
+  else if (browserType == "ie")
+     document.poppedLayer = document.all[element];
+  else
+     document.poppedLayer = document.layers[element];
+
+  if (document.poppedLayer.style.visibility == "visible")
+         hide (element);
+  else
+         show (element);
+
+}
+
index d218040f29717a76b9d85435271827151242ed65..90a6a4814c73ff1179d64ffb0b14424f43a4404c 100644 (file)
@@ -236,7 +236,7 @@ $smarty->assign ("PHPSESSID", session_id());
 if (isset($_SESSION['errors'])){
   $smarty->assign("errors", $_SESSION['errors']);
 }
-$smarty->assign("php_error", $error_collector);
+$smarty->assign("php_error", $error_collector."</div>");
 $smarty->display (get_template_path('login.tpl'));
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 02e89d1d6ddc481d079114ddd3edcfe2c5e6a77f..8bf8414ddfa45d581a35bd1274bfb874ceef7783 100644 (file)
@@ -268,7 +268,7 @@ $smarty->assign("contents", $display);
 if (isset($_SESSION['errors'])){
   $smarty->assign("errors", $_SESSION['errors']);
 }
-$smarty->assign("php_errors", $error_collector);
+$smarty->assign("php_errors", $error_collector."</div>");
 $smarty->display(get_template_path('framework.tpl'));
 $_SESSION['plist']= $plist;
 
index a8608b0613411ac5350d9e1a0607b60fe29a26ca..94a9dd1f311cdf1a7bcf1ac0474bfb05a1ffa2a9 100644 (file)
@@ -140,8 +140,8 @@ class tabs
 
                /* Shorten string if its too long for the tab headers*/
                $title= _($name);
-               if (mb_strlen($title, 'UTF-8') > 13){
-                       $title= mb_substr($title,0, 11, 'UTF-8')."...";
+               if (mb_strlen($title, 'UTF-8') > 14){
+                       $title= mb_substr($title,0, 12, 'UTF-8')."...";
                }
                
                if ($_SESSION['js']==FALSE){    
index 8f2868882254305adc25aad6b870369939e42a64..0b25c020b85973160b5625df15829750a4e9cd8a 100644 (file)
@@ -1525,7 +1525,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
 
   /* Create header as needed */
   if ($error_collector == ""){
-    $error_collector= "<table style='width:100%;background-color:#F0F0F0'><tr><td'><h1><img align=center src='".get_template_path('images/warning.png')."'>&nbsp;"._("Generating this page caused the PHP interpreter to rise some errors!")."</h1></td><td align=right>["._("Send report")."] ["._("Toggle information")."]</td></tr></table>";
+    $error_collector= "<table style='width:100%;background-color:#F0F0F0;border-bottom:1px solid black'><tr><td'><h1><img align=center src='".get_template_path('images/warning.png')."'>&nbsp;"._("Generating this page caused the PHP interpreter to rise some errors!")."</h1></td><td align=right><button onClick='toggle(\"errorbox\")'>"._("Toggle information")."</button></td></tr></table><div id='errorbox' style='position:absolute; z-index:1; visibility: hidden'>";
   }
  
   /* Extract traceback data */