[Fusionforge-commits] r8909 - trunk/gforge/www/themes/gforge

Olaf Lenz olenz at libremir.placard.fr.eu.org
Tue Mar 2 14:58:27 CET 2010


Author: olenz
Date: 2010-03-02 14:58:27 +0100 (Tue, 02 Mar 2010)
New Revision: 8909

Modified:
   trunk/gforge/www/themes/gforge/Theme.class.php
Log:
Fixed tab rendering bug.

Modified: trunk/gforge/www/themes/gforge/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/gforge/Theme.class.php	2010-03-02 13:57:41 UTC (rev 8908)
+++ trunk/gforge/www/themes/gforge/Theme.class.php	2010-03-02 13:58:27 UTC (rev 8909)
@@ -266,6 +266,7 @@
     function tabGenerator($TABS_DIRS,$TABS_TITLES,$nested=false,$selected=false,$sel_tab_bgcolor='WHITE',$total_width='100%') {
         $count=count($TABS_DIRS);
         $width=intval((100/$count));
+	$rest_width=100-$count*$width;
 
         $return = '
 		<!-- start tabs -->
@@ -351,7 +352,18 @@
 		    $return .= '</td>' . "\n";
 	    }
 	}
-	
+
+	if ($rest_width > 0) {
+		$return .= '<td class="tg-middle" style="width:'.$rest_width.'%;">' . "\n";
+		$return .= '<div><div';
+		if ($nested) {
+			$return .= ' class="nested"';
+		}
+		$return .= '>' . "\n";
+		$return .= '</div></div>' . "\n";
+		$return .= '</td>' . "\n";
+	}
+
         $return .= '</tr>
         </table>
         <!-- end tabs -->';




More information about the Fusionforge-commits mailing list