leon 01/10/31 10:33:10
Modified: freetrade2/htdocs freetrade.css
freetrade2/modules/configuration global
freetrade2/modules/database/mysql department
freetrade2/modules/screen admin_attribute
freetrade2/modules/utility box standard_library
Log:
fixing bugs, enhancing support for CSS
Revision Changes Path
1.2 +58 -3 freetrade/freetrade2/htdocs/freetrade.css
Index: freetrade.css
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/htdocs/freetrade.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- freetrade.css 2000/02/11 18:36:26 1.1
+++ freetrade.css 2001/10/31 18:33:09 1.2
@@ -1,9 +1,64 @@
-a:link
+a
{
text-decoration: none;
}
-a:visited
+td
{
- text-decoration: none
+ color: #000000;
+ font-family: arial, helvetica, sans-serif;
}
+
+
+.box
+{
+ border-style: solid;
+ border-color: #CCCCCC;
+ border-width: 2px;
+ background-color: white;
+}
+
+.boxlabel
+{
+ background-color: #EEEEEE;
+ border-style: solid;
+ border-width: 2px;
+ border-color: #CCCCCC;
+ color: #000000;
+ font-family: arial, helvetica, sans-serif;
+ font-weight: bold;
+}
+
+.boxcontents
+{
+ border-style: none;
+ background-color: white;
+
+}
+
+.fttable
+{
+ border-style: solid;
+ border-color: #CCCCCC;
+ border-width: 2px;
+ background-color: white;
+}
+
+.fttablelabel
+{
+ background-color: #EEEEEE;
+ border-style: solid;
+ border-width: 2px;
+ border-color: #CCCCCC;
+ color: #000000;
+ font-family: arial, helvetica, sans-serif;
+ font-weight: bold;
+}
+
+.fttabledata
+{
+ border-style: none;
+ background-color: white;
+ vertical-align: top;
+
+}
\ No newline at end of file
1.13 +2 -16 freetrade/freetrade2/modules/configuration/global
Index: global
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/configuration/global,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- global 2001/10/30 21:14:50 1.12
+++ global 2001/10/31 18:33:09 1.13
@@ -2,12 +2,12 @@
/*
** File: global_settings
** Description: Sets a bunch of global variables
- ** Version: $Revision: 1.12 $
+ ** Version: $Revision: 1.13 $
** Created: 05/18/99
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2001/10/30 21:14:50 $
+ ** Last Revised: $Date: 2001/10/31 18:33:09 $
*/
@@ -276,20 +276,6 @@
define("DATABASE_PASSWORD", "");
define("DATABASE_NAME", "freetrade");
$DatabaseErrorFunction = "mysql_error";
-
-
- /*
- ** Colors used throughout the site
- */
- $SiteColor["Border"] = '#CCCCCC';
- $SiteColor["BodyText"] = '#000000';
- $SiteColor["Headers"] = '#000000';
- $SiteColor["TableBackground"] = '#FFFFFF';
-
- //used for table backgrounds
- $SiteColor['Highlight1'] = '#CCCCCC';
- $SiteColor['Highlight2'] = '#EEEEEE';
-
/*
1.9 +43 -44 freetrade/freetrade2/modules/database/mysql/department
Index: department
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/database/mysql/department,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- department 2001/10/27 00:07:19 1.8
+++ department 2001/10/31 18:33:09 1.9
@@ -6,7 +6,7 @@
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2001/10/27 00:07:19 $
+ ** Last Revised: $Date: 2001/10/31 18:33:09 $
**
*/
@@ -281,14 +281,14 @@
** to show the departments and items.
*/
function directoryTree($deptID, $deptName, $departmentStructure,
- $expandDepartmentsArray)
+ $expandDepartmentsArray, $indentLevel=0)
{
global $department;
$deptID = intval($deptID);
$doExpand = $expandDepartmentsArray[$deptID];
$imploded = onvalKeyImplode("|", $expandDepartmentsArray);
- if ($doExpand)
+ if($doExpand)
{
/*
** Do the expand/unexpand link and the link to dir. Note how
we add
@@ -298,22 +298,23 @@
unset($expandDepartmentsArray[$deptID]); //temporarily
$unexpandImplode = onvalKeyImplode("|",
$expandDepartmentsArray) . " ";
$expandDepartmentsArray[$deptID] = TRUE;
- print("<A HREF=\"" . ScreenURL("admin_departments"));
- print("&department=$department");
- print("&expandDepartments=$unexpandImplode");
- print("\"><IMG SRC=\"images/admin/folder_open.gif\"
ALT=\"Close\" " .
- "BORDER=\"0\" WIDTH=\"20\" HEIGHT=\"20\"></A>\n");
-
- print("<A HREF=\"" . ScreenURL("admin_departments"));
- print("&expandDepartments=$imploded");
- print("&department=$deptID");
- print("\">" . prepareText($deptName) . "</A><BR>\n");
+
+ print(str_repeat(' ', $indentLevel));
+
+ printLink(getImage('admin/folder_open.gif', 20, 20, 'close'),
+ "admin_departments", 0,
+ array('department'=>$department,
+ 'expandDepartments'=>$unexpandImplode));
+
+ printLink(prepareText($deptName),
+ "admin_departments", 1,
+ array('department'=>$deptID,
+ 'expandDepartments'=>$imploded));
/* Show all of the items and sub-departments for this
department. */
$thisDept = $departmentStructure[$deptID];
if ($thisDept) /* Catch case where the root dir is empty. */
{
- print("<UL>\n");
for (reset($thisDept) ; $member=current($thisDept) ;
next($thisDept))
{
@@ -321,49 +322,47 @@
{
list($isDirectory, $ID, $name) =
$member;
directoryTree($ID, $name,
$departmentStructure,
- $expandDepartmentsArray);
+ $expandDepartmentsArray,
$indentLevel+4);
}
else /* Is an item. Base case one. Link to
item. */
{
list($isDirectory, $ID, $name,
$active) = $member;
- print("<A HREF=\"" .
ScreenURL("admin_item"));
- print("&item=$ID");
- print("&department=$deptID");
- print("\">");
- print("<IMG
SRC=\"images/admin/file.gif\" ALT=\"" .
- prepareText($name) . "\"
BORDER=\"0\" WIDTH=\"20\" " .
- "HEIGHT=\"20\">");
-
- /* Put the item in brackets if the
item is inactive. */
- if ($active == "N")
+
+ $label = getImage('admin/file.gif',
20, 20, prepareText($name));
+
+ // Put the item in brackets if the
item is inactive
+ if($active == "N")
{
- print("[" . prepareText($name)
. "]</A><BR>\n");
+ $label .= "[" .
prepareText($name) . "]";
}
else
{
- print(prepareText($name) .
"</A><BR>\n");
+ $label .= prepareText($name);
}
+
+ print(str_repeat(' ',
$indentLevel+4));
+ printLink($label,
+ "admin_item", 1,
+ array('item'=>$ID,
'department'=>$deptID));
}
}
- print("</UL>\n");
}
- } /* end of big "if" */
-
- else /* Don't expand. Base case two. */
+ }
+ else
{
- $expandImplode = $imploded=="" ?
- "$deptID" : "$imploded|$deptID";
- print("<A HREF=\"" . ScreenURL("admin_departments"));
- print("&expandDepartments=$expandImplode");
- print("&department=$department");
- print("\"><IMG SRC=\"images/admin/folder.gif\" ALT=\"Open\" "
.
- "BORDER=\"0\" WIDTH=\"20\" HEIGHT=\"20\"></A>\n");
-
- /* Automatically expand unexpanded dirs when user views them.
*/
- print("<A HREF=\"" . ScreenURL("admin_departments"));
- print("&expandDepartments=$expandImplode");
- print("&department=$deptID");
- print("\">" . prepareText($deptName) . "</A><BR>\n");
+ $expandImplode = $imploded=="" ? "$deptID" :
"$imploded|$deptID";
+
+ print(str_repeat(' ', $indentLevel));
+ printLink(getImage('admin/folder.gif', 20, 20, 'open'),
+ "admin_departments", 0,
+ array('department'=>$department,
+ 'expandDepartments'=>$expandImplode));
+
+ // Automatically expand unexpanded dirs when user views them
+ printLink(prepareText($deptName),
+ "admin_departments", 1,
+ array('department'=>$deptID,
+ 'expandDepartments'=>$expandImplode));
}
}
1.6 +4 -14 freetrade/freetrade2/modules/screen/admin_attribute
Index: admin_attribute
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/screen/admin_attribute,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- admin_attribute 2000/11/08 00:54:35 1.5
+++ admin_attribute 2001/10/31 18:33:09 1.6
@@ -2,25 +2,12 @@
/*
** File: admin_attribute
** Description: administrate attributes
- ** Version: $Revision: 1.5 $
+ ** Version: $Revision: 1.6 $
** Created: 04/21/1999
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2000/11/08 00:54:35 $
- ** Log : $Log: admin_attribute,v $
- ** Log : Revision 1.5 2000/11/08 00:54:35 leon
- ** Log : *** empty log message ***
- ** Log :
- ** Log : Revision 1.4 2000/05/19 19:50:30 leon
- ** Log : Fixed references to database modules, moved build script into
directory
- ** Log : specific to database.
- ** Log :
- ** Log : Revision 1.3 2000/02/11 20:09:51 leon
- ** Log : reworked variation editors.
- ** Log :
- **
- ** Copyright (c) 1999 Working Dogs. All rights reserved.
+ ** Last Revised: $Date: 2001/10/31 18:33:09 $
*/
/*
@@ -39,7 +26,7 @@
include_once(DATABASE_MODULE . "attribute");
printLink(L_ADMINATTRIBUTE_ADDATTRIBUTE, "add_attribute");
- print("<br>\n");
+ printLine('');
print(L_ADMINATTRIBUTE_CHOOSE . "<br>\n");
@@ -65,7 +52,7 @@
array("attribute"=>$a_id, "ACTION"=>"DELETE_ATTRIBUTE"));
//this makes a header like "Color | Add Variation | Destroy"
- startBox("<a href=\"$editURL\">" . prepareText($a["Name"])."</a>",
+ startBox(getLink(prepareText($a["Name"]), $editURL),
array(L_ADMINATTRIBUTE_ADDVARIATION=>$addURL,
L_ADMINATTRIBUTE_DESTROY=>$destroyURL));
1.5 +12 -57 freetrade/freetrade2/modules/utility/box
Index: box
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/utility/box,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- box 2000/11/08 00:54:49 1.4
+++ box 2001/10/31 18:33:10 1.5
@@ -3,31 +3,12 @@
** File: box
** Description: functions for drawing nice boxes around things
** using tables.
- ** Version: $Revision: 1.4 $
+ ** Version: $Revision: 1.5 $
** Created: 9/22/99
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2000/11/08 00:54:49 $
- ** Log : $Log: box,v $
- ** Log : Revision 1.4 2000/11/08 00:54:49 leon
- ** Log : *** empty log message ***
- ** Log :
- ** Log : Revision 1.3 2000/05/10 22:28:13 leon
- ** Log : More changes to admin functionality
- ** Log :
- ** Log : Revision 1.2 2000/02/11 18:36:31 leon
- ** Log :
- ** Log : Worked over the attribute functions, pulling add/update/delete
- ** Log : functionality into module. Also worked over the table and form
- ** Log : generating functions.
- ** Log :
- ** Log : Revision 1.1.1.1 2000/02/05 00:44:43 leon
- ** Log : Importing initial work on FreeTrade 2.0. This code is not really
working
- ** Log : yet, but I want everyone to be able to see what's going on and
possibly
- ** Log : contribute.
- **
- ** Copyright (c) 1999 Working Dogs. All rights reserved.
+ ** Last Revised: $Date: 2001/10/31 18:33:10 $
*/
@@ -42,23 +23,11 @@
*/
function startBox($title=FALSE, $option=FALSE)
{
- global $Browser_Name;
- global $Browser_Version;
- global $SiteColor;
+ global $Browser_CSSOK;
- if(($Browser_Name == "Mozilla") AND ($Browser_Version >= 3))
+ if($Browser_CSSOK OR !GENERATE_CLOAKING_CONSTANTS)
{
- print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
");
- print("color=\"".$SiteColor['Border']."\">\n");
- print("<tr>\n");
- print("<td bgcolor=\"".$SiteColor['Border']."\">\n");
-
- print("<table border=\"0\" cellspacing=\"1\" cellpadding=\"6\"
width=\"100%\">\n");
- }
- elseif(($Browser_Name == "MSIE") AND ($Browser_Version >= 3))
- {
- print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\"
");
- print("bordercolor=\"".$SiteColor['Border']."\">\n");
+ print("<table class=\"box\">\n");
}
else
{
@@ -67,21 +36,21 @@
if($title)
{
- print("<tr><td bgcolor=\"".$SiteColor['Highlight2']."\">");
- print("<b>$title</b>");
+ print("<tr><td class=\"boxlabel\">");
+ print("$title");
if(is_array($option))
{
foreach($option as $key=>$value)
{
- print(" | <A HREF=\"$value\">$key</a>");
+ print(" · <a href=\"$value\">$key</a>");
}
}
print("</td></tr>\n");
}
print("<tr>\n");
- print("<td bgcolor=\"".$SiteColor['TableBackground']."\">\n");
+ print("<td class=\"boxcontents\">\n");
}
@@ -94,26 +63,9 @@
*/
function endBox()
{
- global $Browser_Name;
- global $Browser_Version;
-
- if(($Browser_Name == "Mozilla") AND ($Browser_Version >= 3))
- {
- print("</td>\n");
- print("</tr>\n");
- print("</table>\n");
-
- print("</td>\n");
- print("</tr>\n");
- print("</table>\n\n");
- }
- else
- {
- print("</td>\n");
- print("</tr>\n");
- print("</table>\n\n");
- }
-
+ print("</td>\n");
+ print("</tr>\n");
+ print("</table>\n\n");
}
?>
1.24 +21 -59 freetrade/freetrade2/modules/utility/standard_library
Index: standard_library
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/utility/standard_library,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- standard_library 2001/10/30 21:14:52 1.23
+++ standard_library 2001/10/31 18:33:10 1.24
@@ -6,12 +6,12 @@
** 75% of all page views. Most of these functions were in global_settings
** at one time.
**
- ** Version: $Revision: 1.23 $
+ ** Version: $Revision: 1.24 $
** Created: 10/4/99
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2001/10/30 21:14:52 $
+ ** Last Revised: $Date: 2001/10/31 18:33:10 $
*/
@@ -95,7 +95,7 @@
{
//With flat URLs, these look like "item/123"
//unless they have a square bracket
- $URL .= "/$key/" . prepareText($val);
+ $URL .= "/$key/" .
prepareText(rawurlencode($val));
}
else
{
@@ -421,23 +421,11 @@
*/
function startTable($header=FALSE)
{
- global $Browser_Name;
- global $Browser_Version;
- global $SiteColor;
+ global $Browser_CSSOK;
- if(($Browser_Name == "Mozilla") AND ($Browser_Version >= 3))
+ if($Browser_CSSOK OR !GENERATE_CLOAKING_CONSTANTS)
{
- print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
");
- print("color=\"".$SiteColor['Border']."\">\n");
- print("<tr>\n");
- print("<td bgcolor=\"".$SiteColor['Border']."\">\n");
-
- print("<table border=\"0\" cellspacing=\"1\" cellpadding=\"6\"
width=\"100%\">\n");
- }
- elseif(($Browser_Name == "MSIE") AND ($Browser_Version >= 3))
- {
- print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\"
");
- print("bordercolor=\"".$SiteColor['Border']."\">\n");
+ print("<table class=\"fttable\">\n");
}
else
{
@@ -450,7 +438,7 @@
foreach($header as $h)
{
- print("<th
bgcolor=\"".$SiteColor['Highlight2']."\">$h</th>\n");
+ print("<th class=\"fttablelabel\">$h</th>\n");
}
print("</tr>\n");
@@ -468,21 +456,7 @@
*/
function endTable()
{
- global $Browser_Name;
- global $Browser_Version;
-
- if(($Browser_Name == "Mozilla") AND ($Browser_Version >= 3))
- {
- print("</table>\n");
-
- print("</td>\n");
- print("</tr>\n");
- print("</table>\n\n");
- }
- else
- {
- print("</table>\n\n");
- }
+ print("</table>\n\n");
}
@@ -501,23 +475,19 @@
*/
function printTableRow($label, $field, $prepare=TRUE)
{
- global $SiteColor;
-
print("<tr>\n");
//label
if($label != "")
{
- print("<td bgcolor=\"".$SiteColor['Highlight2']."\">");
- print("<b>$label</b>");
- print("</td>\n");
+ print("<td class=\"fttablelabel\">$label</td>\n");
}
-
+
if(is_array($field))
{
while(list($key, $value) = each($field))
{
- print("<td>");
+ print("<td class=\"fttabledata\">");
if($value == "")
{
//fill empty table cells with a non-breaking
space
@@ -537,7 +507,7 @@
}
else
{
- print("<td>");
+ print("<td class=\"fttabledata\">");
if($field == "")
{
//fill empty table cells with a non-breaking space
@@ -574,27 +544,19 @@
*/
function getEditRow($label, $field, $value, $size=32, $max=FALSE, $type="text")
{
- global $SiteColor;
-
- $data = "<tr>\n";
-
- $data .= "<td bgcolor=\"".$SiteColor['Highlight2']."\">";
- $data .= "<b>$label</b>";
- $data .= "</td>\n";
-
- $data .= "<td>";
- $data .= "<input type=\"$type\" name=\"$field\" size=\"$size\" ";
-
+ $data = "<tr>\n" .
+ "<td class=\"fttablelabel\">$label</td>\n" .
+ "<td class=\"fttabledata\">" .
+ "<input type=\"$type\" name=\"$field\" size=\"$size\"
";
if($max)
{
$data .= "maxlength=\"$max\" ";
}
- $data .= "value=\"" . prepareText($value) . "\">";
- $data .= "</td>\n";
-
- $data .= "</tr>\n";
-
+ $data .= "value=\"" . prepareText($value) . "\">" .
+ "</td>\n" .
+ "</tr>\n";
+
return($data);
}
@@ -641,7 +603,7 @@
function printSubmit($submitLabel, $resetLabel=FALSE, $cols=2)
{
print("<tr>\n");
- print("<td colspan=\"$cols\" align=\"center\">");
+ print("<td colspan=\"$cols\" align=\"center\" class=\"fttabledata\">");
if($resetLabel)
{
print(getReset($resetLabel));
_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev