changeset 1391:7fcea2fce0be

More fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 23 Dec 2013 17:08:10 +0200
parents 791e1f2df912
children ae493885b68e
files www/common.inc.php www/index.php www/info.php www/loc.php www/maps.css
diffstat 5 files changed, 24 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/www/common.inc.php	Mon Dec 23 16:50:16 2013 +0200
+++ b/www/common.inc.php	Mon Dec 23 17:08:10 2013 +0200
@@ -295,18 +295,17 @@
 }
 
 
-function stPrintExtraBoxAlphaList($table)
+function stPrintExtraBoxAlphaList($prefix, $table, $class = FALSE)
 {
-  echo "<div id=\"extrabox\">\n".
-  " <div style=\"font-size: 12pt; padding: 5pt;\">\n";
+  echo "<div id=\"extrabox\"".($class !== FALSE ? " class=\"".$class."\"" : "").">\n";
 
-  foreach ($table as $alpha => $locs) {
+  foreach ($table as $alpha => $locs)
+  {
     $letter = strtoupper($alpha);
-    echo "  <a href=\"#".$letter."\">".$letter."</a>&nbsp;\n";
+    echo "  <a href=\"#".$prefix.$letter."\">".$letter."</a>&nbsp;\n";
   }
 
-  echo "\n </div>\n".
-  "</div>\n";
+  echo "</div>\n";
 }
 
 ?>
\ No newline at end of file
--- a/www/index.php	Mon Dec 23 16:50:16 2013 +0200
+++ b/www/index.php	Mon Dec 23 17:08:10 2013 +0200
@@ -179,5 +179,5 @@
  <a href="http://tnsp.org/~ccr/bat/">Ggr's Bat page</a>
 </div>
 <?
-cmPrintPageFooter();
+cmPrintPageFooter(FALSE);
 ?>
\ No newline at end of file
--- a/www/info.php	Mon Dec 23 16:50:16 2013 +0200
+++ b/www/info.php	Mon Dec 23 17:08:10 2013 +0200
@@ -97,7 +97,7 @@
     usort($data, "wizardSort");
     
     $letter = strtoupper($alpha);
-    echo "<h3><a name=\"".$letter."\"></a>".$letter."</h3>\n";
+    echo "<h3><a id=\"ch".$letter."\"></a>".$letter."</h3>\n";
     echo "<table class=\"loc\">\n";
     $n = 0;
     
@@ -107,7 +107,8 @@
       
       $totalWiz++;
 
-      printf("  <td width=\"%d%%\" style=\"background: %s;\"><a href=\"loc.php?a=%s\">%s</a> <span style=\"color: #f80;\">",
+      printf("  <td style=\"width: %d%%; background: %s;\">".
+        "<a href=\"loc.php?a=%s\">%s</a> <span style=\"color: #f80;\">",
         (100 / $maxRow), (count($wizard) > 2 || isset($wizard["desc"])) ? "#474" : "#744", $wizard["name"], $wizard["name"]);
 
       if ($wizard["areas"] > 0)
@@ -135,7 +136,7 @@
   echo "<p><b>".$totalWiz."</b> wizards.</p>\n";
 
   // Print out the alpha link index
-  stPrintExtraBoxAlphaList($alphaTable);
+  stPrintExtraBoxAlphaList("ch", $alphaTable);
 }
 else
 {
--- a/www/loc.php	Mon Dec 23 16:50:16 2013 +0200
+++ b/www/loc.php	Mon Dec 23 17:08:10 2013 +0200
@@ -295,8 +295,8 @@
     asort($alphaLocs);
     
     echo
-      "<h3><a name=\"".$letter."\"></a>".$letter."</h3>\n".
-      "<table class=\"loc\" width=\"95%\">\n";
+      "<h3><a id=\"ch".$letter."\"></a>".$letter."</h3>\n".
+      "<table class=\"loc\">\n";
  
     $n = 0;
     foreach ($alphaLocs as $ik => $iv)
@@ -307,8 +307,8 @@
       $totalLoc++;
 
       // Print location entry
-      printf("  <td width=\"%d%%\" class=\"%s\">",
-        (100 / $maxRow), $iv["continent"]);
+      printf("  <td class=\"%s\" style=\"width: %d%%\">",
+        $iv["continent"], (100 / $maxRow));
         
       echo stGetMapLink($iv, $continentList[$iv["continent"]][4]);
       
@@ -397,7 +397,7 @@
   
   echo
     "<p><b>".$totalLoc."</b> locations.</p>\n".
-    "</div>\n";
+    "</div>\n"; // end of contents div
 
   // Print out location tooltip HTML code
   foreach ($locationTips as $tipID => $tip)
@@ -408,15 +408,17 @@
       "</b><br />".$tip["desc"]."</div></div>\n";
   }
 
-  // Print out the alpha link index
-  stPrintExtraBoxAlphaList($alphaTable);
+  // Print out the alpha link index div
+  stPrintExtraBoxAlphaList("ch", $alphaTable);
 }
 else
 {
-  echo "<p><b>No locations known!</b></p>\n";
-  echo "</div>\n";
+  echo
+    "<p><b>No locations known!</b></p>\n".
+    "</div>\n"; // end of contents div
+
   stError("No locations known!");
 }
 
-cmPrintPageFooter();
+cmPrintPageFooter(FALSE);
 ?>
\ No newline at end of file
--- a/www/maps.css	Mon Dec 23 16:50:16 2013 +0200
+++ b/www/maps.css	Mon Dec 23 17:08:10 2013 +0200
@@ -58,7 +58,7 @@
 }
 
 table.loc {
-	width: 100%;
+	width: 95%;
 }
 
 table.loc a, table.loc a:visited, table.loc a:active  {