Author: greg.ercolano
Date: 2012-02-22 12:01:47 -0800 (Wed, 22 Feb 2012)
New Revision: 650
Log:
Modify the software downloads page to clarify
development versions highlighted in red.
We've had too much trouble with new users taking
the non-release versions of FLTK2 and FLTK3..
Modified:
trunk/fltk.css
trunk/phplib/html.php
trunk/software.php
Modified: trunk/fltk.css
===================================================================
--- trunk/fltk.css 2011-10-03 20:48:27 UTC (rev 649)
+++ trunk/fltk.css 2012-02-22 20:01:47 UTC (rev 650)
@@ -67,6 +67,20 @@
padding: 2;
}
+TR.header-red, TR.header-red TH, TH.header-red {
+ background-color: #ddaaaa;
+}
+
+TR.data0-red, TR.data0-red TD, TD.data0-red {
+ background-color: #dd7777;
+ padding: 2;
+}
+
+TR.data1-red, TR.data1-red TD, TD.data1-red {
+ background-color: #dd6666;
+ padding: 2;
+}
+
DL {
margin-left: 2em;
}
Modified: trunk/phplib/html.php
===================================================================
--- trunk/phplib/html.php 2011-10-03 20:48:27 UTC (rev 649)
+++ trunk/phplib/html.php 2012-02-22 20:01:47 UTC (rev 650)
@@ -97,7 +97,8 @@
$path = "", // I - Relative path to root
$refresh = "", // I - Refresh URL
$tab_links = "", // I - Tab links, if any
- $javascript = "") // I - Javascript, if any
+ $javascript = "", // I - Javascript, if any
+ $class = "header") // I - CSS class, if any
{
global $html_keywords, $html_links, $html_names, $html_path, $html_sections,
$argc, $argv, $PHP_SELF, $LOGIN_USER, $LOGIN_LEVEL, $_SERVER,
@@ -229,7 +230,7 @@
print("<table width='100%' border='0' cellspacing='0' "
."cellpadding='0' summary='Page'>\n"
- ."<tr class='header'>"
+ ."<tr class='${class}'>"
."<td valign='top' width='15' rowspan='2'>"
."<a href='${path}index.php'><img src='${path}images/top-left.gif' "
."width='15' height='70' border='0' alt=''></a>"
@@ -249,7 +250,7 @@
."</tr>\n");
// Tabs
- print("<tr class='header'>"
+ print("<tr class='${class}'>"
."<td width='100%' colspan='2' valign='bottom' nowrap>");
reset($html_sections);
@@ -380,7 +381,7 @@
//
function
-html_footer()
+html_footer($class = "header") // I - CSS class, if any
{
global $html_path, $html_show_all;
@@ -389,7 +390,7 @@
{
print("</td></tr></table></td><td width='15'> </td></tr>\n");
print("<tr class='page'><td colspan='5'> </td></tr>\n");
- print("<tr class='header'>"
+ print("<tr class='${class}'>"
."<td valign='bottom' width='15'><img
src='${html_path}images/bottom-left.gif' "
."width='4' height='4' alt=''></td>"
."<td colspan='3' width='100%'><small> <br>"
@@ -489,39 +490,58 @@
//
function
-html_start_table($headings) // I - Array of heading strings
+html_start_table($headings, // I - Array of heading strings
+ $title="", // I - Table title (if any)
+ $class="") // I - CSS class to use for heading (if
any)
{
global $html_row, $html_cols, $html_path, $html_show_all;
+ $html_row = 0;
+ $html_cols = count($headings);
+ if ( $class == "" ) { $class = "header"; }
if ($html_show_all)
- print("<br><table border='0' cellpadding='0' cellspacing='0' width='100%' "
- ."summary=''>"
- ."<tr class='header'><th align='left' valign='top'>"
- ."<img src='${html_path}images/hdr-top-left.gif' width='4' height='4' "
- ."alt=''></th>");
+ {
+ print("<br><table border='0' cellpadding='0' cellspacing='0' width='100%'
summary=''>\n");
+ if ( $title != "" )
+ {
+ print(" <tr class='${class}'>\n"
+ ." <th></th>\n"
+ ." <th align=center colspan='$html_cols'>$title</th>\n"
+ ." <th></th>\n"
+ ." </tr>\n");
+ }
+ print(" <tr class='${class}'>\n"
+ ." <th align='left' valign='top'>"
+ ."<img src='${html_path}images/hdr-top-left.gif' width='4' height='4'
alt=''></th>\n");
+ }
else
- print("<br><table border='1' cellpadding='5' cellspacing='0' width='100%' "
- ."summary=''>"
- ."<tr bgcolor='#cccccc'>");
+ {
+ print("<br><table border='1' cellpadding='5' cellspacing='0' width='100%'
summary=''>");
+ if ( $title != "" )
+ {
+ print(" <tr class='${class}'>\n"
+ ." <th align=center colspan='$html_cols'>$title</th>\n"
+ ." </tr>\n");
+ }
+ print(" <tr bgcolor='#cccccc'>\n");
+ }
- $html_row = 0;
- $html_cols = count($headings);
-
for ($i = 0; $i < count($headings); $i ++)
{
$header = $headings[$i];
if (strlen($header))
- print("<th nowrap>$header</th>");
+ print(" <th nowrap>$header</th>\n");
else
- print("<th> </th>");
+ print(" <th> </th>\n");
}
if ($html_show_all)
- print("<th align='right' valign='top'>"
+ print(" <th align='right' valign='top'>"
."<img src='${html_path}images/hdr-top-right.gif' "
- ."width='4' height='4' alt=''></th></tr>\n");
+ ."width='4' height='4' alt=''></th>\n"
+ ." </tr>\n");
else
print("</tr>\n");
}
@@ -561,9 +581,10 @@
$classname = "data$html_row";
if ($html_show_all)
- print("<tr class='$classname'><td> </td>");
+ print(" <tr class='$classname'>\n"
+ ." <td> </td>\n");
else
- print("<tr>");
+ print(" <tr>\n");
}
@@ -579,9 +600,10 @@
$html_row = 1 - $html_row;
if ($html_show_all)
- print("<td> </td></tr>\n");
+ print(" <td> </td>\n"
+ ." </tr>\n");
else
- print("</tr>\n");
+ print(" </tr>\n");
}
Modified: trunk/software.php
===================================================================
--- trunk/software.php 2011-10-03 20:48:27 UTC (rev 649)
+++ trunk/software.php 2012-02-22 20:01:47 UTC (rev 650)
@@ -21,7 +21,7 @@
fclose($fp);
-$fp = fopen("data/snapshots.md5", "r");
+$fp = fopen("data/snapshots.md5", "r");
while ($line = fgets($fp, 255))
$files[sizeof($files)] = trim($line);
@@ -121,10 +121,12 @@
// Show files...
print("<h2>Source Code</h2>\n");
- html_start_table(array("Version", "Filename", "Size", "MD5 Sum"));
-
+ $headings = array("Version", "Filename", "Size", "MD5 Sum");
$curversion = "";
+ $dev = 0;
+ html_start_table($headings, "- - Public Releases - -");
+
for ($i = 0; $i < sizeof($files); $i ++)
{
// Grab the data for the current file...
@@ -134,8 +136,22 @@
$filename = $data[2];
$basename = basename($filename);
- html_start_row();
+ // dev version?
+ $class = "";
+ if ( strncmp($fversion, "1.", 2) != 0 )
+ {
+ $class = "data0-red";
+ // Start dev section of table?
+ if ( $dev == 0 )
+ {
+ html_end_table();
+ html_start_table($headings, "- - Development Only - -", "header-red");
+ $dev = 1;
+ }
+ }
+ html_start_row($class);
+
if ($fversion == $version)
{
$cs = "<th>";
@@ -153,21 +169,21 @@
{
print("<td colspan='4'></td>");
html_end_row();
- html_start_row();
+ html_start_row($class);
}
$curversion = $fversion;
- print("$cs<a name='v$fversion'>$fversion</a>$ce");
+ print(" $cs<a name='v$fversion'>$fversion</a>$ce\n");
}
else
- print("$cs$ce");
+ print(" $cs$ce\n");
$kbytes = (int)((filesize("/home/ftp.easysw.com/pub/$filename") + 1023) /
1024);
- print("$cs<a href='$PHP_SELF?VERSION=$version&FILE=$filename'>"
+ print(" $cs<a href='$PHP_SELF?VERSION=$version&FILE=$filename'>"
."<tt>$basename</tt></a>$ce"
."$cs${kbytes}k$ce"
- ."$cs<tt>$md5</tt>$ce");
+ ."$cs<tt>$md5</tt>$ce\n");
html_end_row();
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit