X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_tabs.inc;h=c71fa94920e3988584c1371a0642647d7e7d1145;hb=41b3851a98576e3cd9b843a63353a9e669c4f501;hp=78147cd0fa6332c23b400a2319e017b6d90e3f28;hpb=da6de1ed136c1659d451e61cf00b950b7cf2e249;p=gosa.git diff --git a/include/class_tabs.inc b/include/class_tabs.inc index 78147cd0f..c71fa9492 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -38,10 +38,19 @@ class tabs /* Save dn */ $this->dn= $dn; $this->config= $config; + + $baseobject= NULL; foreach ($data as $tab){ $this->by_name[$tab['CLASS']]= $tab['NAME']; - $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn); + + if ($baseobject == NULL){ + $baseobject= new $tab['CLASS']($this->config, $this->dn); + $this->by_object[$tab['CLASS']]= $baseobject; + } else { + $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject); + } + $this->by_object[$tab['CLASS']]->parent= &$this; $this->by_object[$tab['CLASS']]->set_acl_category($acl_category); @@ -141,11 +150,14 @@ class tabs $display.= ""; /* Shorten string if its too long for the tab headers*/ - $title= ''._($name).''; + $title= _($name); if (mb_strlen($title, 'UTF-8') > 28){ $title= mb_substr($title,0, 25, 'UTF-8')."..."; } - + + /* nobr causes w3c warnings so we use   to keep the tab name in one line */ + $title= preg_replace("/ /"," ",$title); + if ($_SESSION['js']==FALSE){ $display.= "