Code

Fixed functions.inc: progressbar()
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Jul 2008 11:46:49 +0000 (11:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Jul 2008 11:46:49 +0000 (11:46 +0000)
- Was broken in Firefox 3.x

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12046 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc

index 6b55a0cf94ef7b5a40cf318fe84a1194aa8f8f0a..33b35839a306a7c1833bebd605df2fd1421584d4 100644 (file)
@@ -2079,34 +2079,33 @@ function progressbar($percentage,$width=100,$height=15,$showvalue=false)
 
   $progress = (int)(($percentage /100)*$width);
 
-  /* Abort printing out percentage, if divs are to small */
-
-
   /* If theres a better solution for this, use it... */
-  $str = "
-    <div style=\" width:".($width)."px; 
-    height:".($height)."px;
-  background-color:#000000;
-padding:1px;\">
+  $str = "\n   <div style=\" width:".($width)."px; ";
+  $str.= "\n       height:".($height)."px; ";
+  $str.= "\n       background-color:#000000; ";
+  $str.= "\n       padding:1px;\" > ";
 
-          <div style=\" width:".($width)."px;
-        background-color:#$bgcolor;
-height:".($height)."px;\">
+  $str.= "\n     <div style=\" width:".($width)."px; ";
+  $str.= "\n         background-color:#$bgcolor; ";
+  $str.= "\n         height:".($height)."px;\" > ";
 
-         <div style=\" width:".$progress."px;
-height:".$height."px;
-       background-color:#".$color2.$color2.$color."; \">";
 
+  if(($height >10)&&($showvalue)){
+    $str.= "\n   <font style=\"font-size:".($height-2)."px; ";
+    $str.= "\n     color:#FF0000; align:middle; ";
+    $str.= "\n     padding-left:".((int)(($width*0.4)))."px; \"> ";
+    $str.= "\n     <b>".$percentage."%</b> ";
+    $str.= "\n   </font> ";
+  }
 
-       if(($height >10)&&($showvalue)){
-         $str.=                 "<font style=\"font-size:".($height-2)."px;color:#FF0000;align:middle;padding-left:".((int)(($width*0.4)))."px;\">
-           <b>".$percentage."%</b>
-           </font>";
-       }
-
-       $str.= "</div></div></div>";
+  $str.= "\n       <div style=\" width:".$progress."px; ";
+  $str.= "\n         height:".$height."px; ";
+  $str.= "\n         background-color:#".$color2.$color2.$color."; \" >";
+  $str.= "\n       </div>";
+  $str.= "\n     </div>";
+  $str.= "\n   </div>";
 
-       return($str);
+  return($str);
 }