X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_tabs.inc;h=fc1af5227fff3637bc355cc45634c6d7ab86c5bd;hb=704fa7ddaac7fbf1168a1c58c3dd394c14755cd1;hp=f6865b9d08a99008db3bb2a164f0c0a840f062e5;hpb=53b18b7cdcd264ef37697eb5b2a96157d07c9d17;p=gosa.git diff --git a/include/class_tabs.inc b/include/class_tabs.inc index f6865b9d0..fc1af5227 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -30,6 +30,7 @@ class tabs var $disabled= ""; var $by_name= array(); var $by_object= array(); + var $SubDialog = false; function tabs($config, $data, $dn) { @@ -136,12 +137,12 @@ class tabs } /* Paint tab */ - $display.= ""; + $display.= ""; /* 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')."..."; + $title= ''._($name).''; + if (mb_strlen($title, 'UTF-8') > 28){ + $title= mb_substr($title,0, 25, 'UTF-8')."..."; } if ($_SESSION['js']==FALSE){ @@ -174,6 +175,15 @@ class tabs function delete() { + /* Check if all plugins will ACK for deletion */ + foreach (array_reverse($this->by_object) as $key => $obj){ + $reason= $obj->allow_remove(); + if ($reason != ""){ + print_red(sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason)); + return; + } + } + /* Delete for all plugins */ foreach (array_reverse($this->by_object) as $key => $obj){ $obj->remove_from_parent(); @@ -263,14 +273,33 @@ class tabs function getCopyDialog() { $ret = ""; + $this->SubDialog = false; foreach ($this->by_object as $key => $obj){ if($obj->is_account){ - $ret .= $this->by_object[$key]->getCopyDialog(); + $tmp = $this->by_object[$key]->getCopyDialog(); + if($tmp['status'] == "SubDialog"){ + $this->SubDialog = true; + return($tmp['string']); + }else{ + $ret .= $tmp['string']; + } } } return($ret); } + + function addSpecialTabs() + { + $this->by_name['acl']= _("ACL"); + $this->by_object['acl']= new acl($this->config, $this, $this->dn); + $this->by_object['acl']->parent= &$this; + $this->by_name['reference']= _("References"); + $this->by_object['reference']= new reference($this->config, $this->dn); + $this->by_object['reference']->parent= &$this; + } + + } ?>