diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index f94d985014a5a480106ece032e5a44a16dc0a386..e008c73c0758103b33dc8f8ecefb76228610de8f 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
$display= $this->gen_tabs();
/* Show object */
- $display.= "<table cellpadding=4 cellspacing=0 border=0 style=\"width:100%; background-color:#F0F0F0; border-style:solid; border-color:black; border-top-width:0px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px;\">\n";
+ $display.= "<table summary=\"\" cellpadding=4 cellspacing=0 border=0 style=\"width:100%; background-color:#F0F0F0; border-style:solid; border-color:black; border-top-width:0px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px;\">\n";
$display.= "<tr><td>\n";
$obj= $this->by_object[$this->current];
function gen_tabs()
{
$display= "<input type=\"hidden\" name=\"arg\" value=\"\">";
- $display.= "<table cellpadding=0 cellspacing=0 border=0 style=\"width:100%;\"><tr>";
+ $display.= "<table summary=\"\" cellpadding=0 cellspacing=0 border=0 style=\"width:100%;\"><tr>";
$index= 0;
$style= array("tab_left", "tab_active", "tab_near_active", "tab_right");
foreach ($this->by_name as $class => $name){
/* Paint tab */
$display.= "<td style=\"vertical-align:bottom; width:100px;\">";
+
+ /* Shorten string if its too long for the tab headers*/
+ $title= _($name);
+ if (mb_strlen($title, 'UTF-8') > 14){
+ $title= mb_substr($title,0, 12, '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>";
}