[Fusionforge-commits] r11362 - in trunk/src/www: include themes/funky themes/funky/css

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Wed Nov 3 20:45:33 CET 2010


Author: aljeux
Date: 2010-11-03 20:45:33 +0100 (Wed, 03 Nov 2010)
New Revision: 11362

Modified:
   trunk/src/www/include/Layout.class.php
   trunk/src/www/themes/funky/Theme.class.php
   trunk/src/www/themes/funky/css/theme.css
Log:
Switch funky theme to xhtml transitional to first have a valid theme.
Make generated code readable.

Modified: trunk/src/www/include/Layout.class.php
===================================================================
--- trunk/src/www/include/Layout.class.php	2010-11-03 19:45:24 UTC (rev 11361)
+++ trunk/src/www/include/Layout.class.php	2010-11-03 19:45:33 UTC (rev 11362)
@@ -327,14 +327,14 @@
 	 *
 	 */
 	function headerHTMLDeclaration() {
-		print '<?xml version="1.0" encoding="utf-8"?>';
-		if ($this->doctype=='strict') { 
-			echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+		print '<?xml version="1.0" encoding="utf-8"?>'."\n";
+		if (isset($this->doctype) && $this->doctype=='strict') {
+			echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
 		} else {
-			echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+			echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
 		} 
 		echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' 
-			. _('en') . '" lang="' . _('en') . '">';
+			. _('en') . '" lang="' . _('en') . '">'."\n";
 	}
 
 	/**

Modified: trunk/src/www/themes/funky/Theme.class.php
===================================================================
--- trunk/src/www/themes/funky/Theme.class.php	2010-11-03 19:45:24 UTC (rev 11361)
+++ trunk/src/www/themes/funky/Theme.class.php	2010-11-03 19:45:33 UTC (rev 11362)
@@ -3,6 +3,7 @@
  * FusionForge Funky Theme
  *
  * Copyright 2010, Antoine Mercadal - Capgemini
+ * Copyright 2010, Marc-Etienne Vargenau, Alcatel-Lucent
  *
  * This file is part of FusionForge.
  *
@@ -37,15 +38,13 @@
         $this->themeurl = util_make_url('themes/funky/');
         $this->imgbaseurl = $this->themeurl . 'images/';
         $this->imgroot = $this->imgbaseurl;
-        $this->doctype = 'strict';
+//        $this->doctype = 'strict';
         $this->cssbaseurl = $this->themeurl . 'css/';
-        $this->cssurls = array(
-            util_make_url ('/themes/css/fusionforge.css'),
-            $this->cssbaseurl .'theme.css',
-            $this->cssbaseurl .'theme-pages.css');
+
+        $this->addStylesheet('/themes/funky/css/theme.css');
+        $this->addStylesheet('/themes/funky/css/theme-pages.css');
     }
     
-    
     function quicknewsbutton()
     {
         return "<div class='quicknews-toggle'><a href=# onclick='jQuery(\".quicknews\").slideToggle()'>news</a></div>";
@@ -67,12 +66,12 @@
     function bodyHeader($params)
     {
         global $user_guide, $HTML;
-        echo '<table id="header" class="width-100p100">';
-        echo '<tr>';
-        echo '<td id="header-col1">';
-        echo '<h1>'.  util_make_link ('/', html_image('/header/top-logo.png',null,null,array('alt'=>'FusionForge Home'))) .'</h1>';
-        echo '</td>';
-        echo '<td id="header-col2">';
+        echo '<table id="header" class="width-100p100">' . "\n";
+        echo '<tr>' . "\n";
+        echo '<td id="header-col1">' . "\n";
+        echo '<h1>'.  util_make_link ('/', html_image('/header/top-logo.png',null,null,array('alt'=>'FusionForge Home'))) .'</h1>' . "\n";
+        echo '</td>' . "\n";
+        echo '<td id="header-col2">' . "\n";
         
         $items = $this->navigation->getUserLinks();
         for ($j = 0; $j < count($items['titles']); $j++) 
@@ -82,37 +81,40 @@
         echo implode(' | ', $links);
         plugin_hook ('headermenu', $params);
         
-        echo '</td><tr><td colspan=2 id="header-line2">';
+        echo '</td>' . "\n";
+        echo '</tr>' . "\n";
+        echo '<tr>' . "\n";
+        echo '<td colspan="2" id="header-line2">' . "\n";
         // echo $this->quicknewsbutton();
         $this->quickNav();
         $this->searchBox();
         
-        echo '</td></tr>';
-        echo '</td><tr><td colspan=2 id="header-news">';
+        echo '</td></tr>' . "\n";
+        echo '<tr><td colspan="2" id="header-news">' . "\n";
         //echo $this->quicknews();
-        echo'</td></tr></table><!-- outer tabs -->';
+        echo'</td></tr></table><!-- outer tabs -->' . "\n";
         echo $this->outerTabs($params);
-        echo '<!-- inner tabs -->';
-        echo '<div class="innertabs">';
+        echo '<!-- inner tabs -->' . "\n";
+        echo '<div class="innertabs">' . "\n";
         if (isset($params['group']) && $params['group'])
             echo $this->projectTabs($params['toptab'],$params['group']);
             
-        echo '</div>';
-        echo '<div id="maindiv">';
+        echo '</div>' . "\n";
+        echo '<div id="maindiv">' . "\n";
     }
         
     function bodyFooter($params) {
-        echo '</div><!-- id="maindiv" -->';
+        echo '</div><!-- id="maindiv" -->' . "\n";
     }
         
     function footer($params)
     {
         $this->bodyFooter($params);
-        echo '<div class="footer">';
+        echo '<div class="footer">' . "\n";
         // echo '<div>Theme designed by Antoine Mercadal. Copyright &copy; 2010 Capgemini';
         echo $this->navigation->getPoweredBy();
         echo $this->navigation->getShowSource();
-        echo '<div style="clear:both"></div></body></html>';
+        echo '<div style="clear:both"></div></div></body></html>' . "\n";
     }
 
     /**
@@ -181,36 +183,6 @@
             return 'class="bgcolor-grey"';
     }
 
-    /**
-     * listTableTop() - Takes an array of titles and builds the first row of a new table.
-     *
-     * @param       array   The array of titles
-     * @param       array   The array of title links
-     * @param       boolean Whether to highlight or not the entry
-     */
-    function listTableTop ($title_arr, $links_arr=false, $selected=false)
-    {
-        $return = '<table class="width-100p100 listTable';
-        if ($selected == true)
-            $return .= ' selected';
-        $return .= '"><tr>';
-        
-        $count=count($title_arr);
-        
-        if ($links_arr)
-            for ($i=0; $i<$count; $i++)
-            {
-                $return .= '<th scope="col"><a class="sortbutton" href="';
-                $return .=util_make_url ($links_arr[$i]);
-                $return .= '"><strong>'.$title_arr[$i].'</strong></a></th>';
-            }
-        else
-            for ($i=0; $i<$count; $i++)
-                $return .= '<th scope="col"><strong>'.$title_arr[$i].'</strong></th>';
-        
-        return $return.'</tr>';
-    }
-
     function listTableBottom()
     {
         return '</table>';
@@ -244,21 +216,21 @@
 
             // middle part
             $return .= '<td class="tg-middle" style="width:'.$tabwidth.'%;"><a href="'.$TABS_DIRS[$i].'">' . "\n";
-            $return .= '<div';
+            $return .= '<span';
             
             if ($selected == $i)
                 $return .= ' class="selected"';
             
             $return .= '>';
-            $return .= '<div';
+            $return .= '<span';
             
             if ($nested)
                 $return .= ' class="nested"';
             
             $return .= '>' . "\n";
             $return .= ''.$TABS_TITLES[$i].'' . "\n";
-            $return .= '</div>';
-            $return .= '</div>' . "\n";
+            $return .= '</span>';
+            $return .= '</span>' . "\n";
             $return .= '</a></td>' . "\n";
             
         }
@@ -410,10 +382,10 @@
         plugin_hook ("javascript_file",false);
 		echo $this->getJavascripts();
         ?>
-        <script>
+        <script type="text/javascript">
             jQuery.noConflict();
             jQuery(window).load(function(){
-                    jQuery(".quicknews").hide();
+                    Query(".quicknews").hide();
             });
         </script>
         <?php

Modified: trunk/src/www/themes/funky/css/theme.css
===================================================================
--- trunk/src/www/themes/funky/css/theme.css	2010-11-03 19:45:24 UTC (rev 11361)
+++ trunk/src/www/themes/funky/css/theme.css	2010-11-03 19:45:33 UTC (rev 11362)
@@ -181,7 +181,7 @@
     display: table-cell;
 }
 
-#header-news div {
+#header-news span {
     background-color: #41495C;
     height: 200px;
 }
@@ -246,13 +246,12 @@
 }
 
 
-#searchBox div{
+#searchBox span {
   display: inline;
   margin-left: 20px;
 }
 
-
-#searchBox div input[type=text] {
+#searchBox span input[type=text] {
     padding-left: 20px;
     border-radius: 20px;
     height: 15px;
@@ -266,12 +265,10 @@
     height: 10px;
 }
 
-#searchBox div input[type=submit] {
+#searchBox span input[type=submit] {
     display:none;
 }
 
-
-
 /* =quicknavform */
 #quicknavform {
     display: inline;
@@ -279,7 +276,7 @@
     float: left;
 }
 
-#quicknavform div{
+#quicknavform span {
     display: inline;
     color: white;
 }
@@ -312,12 +309,13 @@
   vertical-align: bottom;
 }
 
-.tabGenerator .tg-middle div {
+.tabGenerator .tg-middle span {
     background-color: #41495C;
     margin-top: 0px;
 }
 
-.tabGenerator .tg-middle div div {
+.tabGenerator .tg-middle span span {
+    display: block;
     text-align:center;
     vertical-align: middle;
     height: 20px;
@@ -341,27 +339,28 @@
     transition-duration: 0.3s;
 }
 
-.tabGenerator .tg-middle div div:hover {
+.tabGenerator .tg-middle span span:hover {
+    display: block;
     background-color: white;
     text-shadow: 1px 1px white;
     height: 30px;
 }
 
-.tabGenerator .tg-middle div div a {
+.tabGenerator .tg-middle span span a {
+    display: block;
     color: black;
 }
 
-.tabGenerator .tg-middle div.selected div {
+.tabGenerator .tg-middle span.selected span {
     background-color: white;
     text-shadow: 1px 1px white;
     height: 30px;
 }
 
-.tabGenerator .tg-right div.selected div {
+.tabGenerator .tg-right span.selected span {
     display:none;
 }
 
-
 /*
     innertabs
 */
@@ -386,12 +385,13 @@
   vertical-align: middle; 
 }
 
-.innertabs .tabGenerator .tg-middle div {
+.innertabs .tabGenerator .tg-middle span {
     background-color: #F7F7F7;
     margin-top: 0px;
 }
 
-.innertabs .tabGenerator .tg-middle div div {
+.innertabs .tabGenerator .tg-middle span span {
+    display: block;
     text-align:center;
     vertical-align: middle;
     height: 20px;
@@ -410,25 +410,25 @@
     
 }
 
-.innertabs .tabGenerator .tg-middle div div:hover {
+.innertabs .tabGenerator .tg-middle span span:hover {
+    display: block;
     background-color: white;
 }
 
-.innertabs  .tabGenerator .tg-middle div div a {
+.innertabs  .tabGenerator .tg-middle span span a {
+    display: block;
     color: black;
 }
 
-.innertabs  .tabGenerator .tg-middle div.selected div {
+.innertabs  .tabGenerator .tg-middle span.selected span {
     background-color: white;
     text-shadow: 1px 1px white;
 }
 
-.innertabs  .tabGenerator .tg-right div.selected div {
+.innertabs  .tabGenerator .tg-right span.selected span {
     display:none;
 }
 
-
-
 /* =tabber */
 .topTab, a.topTab, a.topTab:visited, a.topTab:hover,
 .topTabSelected, a.topTabSelected, a.topTabSelected:visited,




More information about the Fusionforge-commits mailing list