Code

Cut descriptions to avoid tab breakage
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2005 11:28:39 +0000 (11:28 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2005 11:28:39 +0000 (11:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@240 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_tabs.inc

index f94d985014a5a480106ece032e5a44a16dc0a386..1bab2b70f9a0972efafe94992acd805f6def0a4a 100644 (file)
@@ -137,11 +137,15 @@ class tabs
 
                /* Paint tab */
                $display.= "<td style=\"vertical-align:bottom; width:100px;\">";
+               $title= _($name);
+               if (mb_strlen($title) > 14){
+                       $title= mb_substr($title,0, 11, 'UTF-8')."...";
+               }
                if ($_SESSION['js']==FALSE){    
                        $display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
-                                  " class=\"$style[$index]\" value=\""._($name)."\"";
+                                  " class=\"$style[$index]\" value=\"$title\"";
                } else {                         
-                       $display.= "<div class=\"$style[$index]\"><a class=\"$style[$index]\" onclick=\"return true;\" href=\"javascript:document.mainform.arg.value='$class';document.mainform.submit();\">"._($name)."</a";
+                       $display.= "<div class=\"$style[$index]\"><a class=\"$style[$index]\" onclick=\"return true;\" href=\"javascript:document.mainform.arg.value='$class';document.mainform.submit();\">$title</a";
                }
                $display.= "></div></td>";
        }