From: hickert Date: Thu, 8 Dec 2005 12:08:03 +0000 (+0000) Subject: Added seperator X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=293142979d20352866108b9e8829ad607a4780e9;p=gosa.git Added seperator git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2254 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 385004292..59fb4d7ca 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -269,8 +269,23 @@ class appgroup extends plugin $this->gosaMemberApplication[$cat] =$tmp; } - function AddSeperator() + function AddSeperator($id) { + $found = false; + $cat = ""; + $tmp = array(); + foreach($this->gosaMemberApplication[$this->curCatDir] as $appID => $app){ + $tmp[] = $app; + if(($app['App'] == $id)&&(!$found)){ + $cnt = count($this->gosaMemberApplication[$this->curCatDir]); + $tmp[] = array("App" => "__SEPARATOR__".($cnt+1)); + $found = true; + } + } + if($found){ + $this->gosaMemberApplication[$this->curCatDir]=$tmp; + } + return; $cat = $this->curCatDir; $cnt = count($this->gosaMemberApplication[$cat]); $tmp = array("App" => "__SEPARATOR__".($cnt+1)); @@ -289,10 +304,6 @@ class appgroup extends plugin } } - if(isset($_POST['AddSeperator'])){ - $this->AddSeperator(); - } - if((isset($_GET['act']))&&($_GET['act']=="open")){ $this->curCatDir = $_GET['id']; } @@ -344,6 +355,11 @@ class appgroup extends plugin $this->reload(); foreach($_POST as $name => $value){ + if(preg_match("/AddSep_/",$name)){ + $this->AddSeperator($value); + } + + if(preg_match("/DelApp_/",$name)){ $app = $value; @@ -584,7 +600,9 @@ class appgroup extends plugin $separator ="
"; - $upudown = " ". + $sep = ""; + + $upudown =" ". "  ". " "; $edit= " "; @@ -596,7 +614,7 @@ class appgroup extends plugin array("string"=>preg_replace("/\%s/",$entry['App'],$upudown.""),"attach"=>"align='right' style='border-right:0px;'"))); }else{ $div2 ->AddEntry(array(array("string"=>sprintf($app,$entry['App'])), - array("string"=>preg_replace("/\%s/",$entry['App'],$upudown.$edit),"attach"=>"align='right' style='border-right:0px;'"))); + array("string"=>preg_replace("/\%s/",$entry['App'],$sep.$upudown.$edit),"attach"=>"align='right' style='border-right:0px;'"))); } } }