Code

Added dhcp plugin to general include list
[gosa.git] / include / class_tabs.inc
index 1571bdadadb9dd072e46a0cc5a2c1d460ccf6a51..ba24d9530e8f047d06ba1633cd55b7ab1dc1322f 100644 (file)
@@ -149,7 +149,7 @@ class tabs
                }
 
                /* Paint tab */
-               $display.= "<td style=\"vertical-align:bottom;width:1px;\">";
+               $display.= "<td style=\"vertical-align:bottom;width:1px;white-space:nowrap;\">";
 
                /* Shorten string if its too long for the tab headers*/
                $title= _($name);
@@ -159,11 +159,17 @@ class tabs
 
                $title= preg_replace("/ /", "&nbsp;", $title);
                
+               /* Take care about notifications */
+               if ($this->by_object[$class]->pl_notify){
+                       $notify= "id=\"notify\"";
+               } else {
+                       $notify= "";
+               }
                if ($_SESSION['js']==FALSE){    
-                       $display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
+                       $display.= "<div class=\"$style[$index]\" $notify><input type=\"submit\" name=\"$class\"".
                                   " 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();\">$title</a";
+                       $display.= "<div $notify 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>";
        }
@@ -223,21 +229,31 @@ class tabs
        $this->save_object(TRUE);
        $messages= array();
 
+  $current_set = FALSE;
+
        /* Check all plugins */
        foreach ($this->by_object as $key => $obj){
                if ($obj->is_account || $ignore_account || $obj->ignore_account){
                        @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
                                $key, "Checking");
 
-                       $messages= $obj->check();
+                       $msg= $obj->check();
       if (is_php4()){
         $this->by_object[$key]= $obj;
       }
-                       if (count($messages)){
-                               $this->current= $key;
-                               break;
-                       }
-               }
+                       if (count($msg)){
+        $this->by_object[$key]->pl_notify= TRUE;
+        if(!$current_set){
+          $current_set = TRUE;
+                               $this->current= $key; 
+          $messages = $msg;
+        }
+                       }else{
+        $this->by_object[$key]->pl_notify= FALSE;
+      }
+               }else{
+      $this->by_object[$key]->pl_notify= FALSE;
+    }
        }
 
        return ($messages);