aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenox <as@tenoware.com>2016-08-22 00:22:46 -0700
committertenox <as@tenoware.com>2016-08-22 00:22:46 -0700
commit77fb204475e2a6920f9575686446f98f664b1fd4 (patch)
tree8dbcaa96c5adeebfc4415cd2564fb660d111f409
parentb6e3b402faee30fa8cb4a6b43bd34151e2f4a1bc (diff)
downloadwfm-77fb204475e2a6920f9575686446f98f664b1fd4.tar.gz
fixed highligh for non-js browsers
-rw-r--r--dir.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/dir.c b/dir.c
index cc67708..7f2f1f8 100644
--- a/dir.c
+++ b/dir.c
@@ -16,6 +16,7 @@ char M_YR[]="<FONT COLOR=\"#909090\">(Last Year)";
char M_OLD[]="<FONT COLOR=\"#C0C0C0\">(Old)";
char tNORMAL_COLOR[]="FFFFFF";
+char tALTER_COLOR[]="F0F0F0"; // for alternating lines
char tHIGH_COLOR[]="33CC33";
char tHL_COLOR[]="FFD700";
@@ -417,12 +418,15 @@ void dirlist(void) {
fprintf(cgiOut,
"<!-- Directory Entry -->\n");
- if(js) fprintf(cgiOut,
- "<TR BGCOLOR=\"#%s\" onMouseOver=\"this.bgColor='#%s';\" onMouseOut=\"this.bgColor='#%s';\">\n",
- linecolor, HL_COLOR, linecolor);
+ fprintf(cgiOut,
+ "<TR BGCOLOR=\"#%s\" ", linecolor);
+
+ if(js)
+ fprintf(cgiOut, "onMouseOver=\"this.bgColor='#%s';\" onMouseOut=\"this.bgColor='#%s';\">\n",
+ HL_COLOR, linecolor);
fprintf(cgiOut,
- "<TD NOWRAP ALIGN=\"LEFT\">\n"
+ "><TD NOWRAP ALIGN=\"LEFT\">\n"
"<INPUT TYPE=\"CHECKBOX\" NAME=\"multiselect_filename\" STYLE=\"border: none;\" VALUE=\"%s\">",
name);
@@ -510,12 +514,15 @@ void dirlist(void) {
fprintf(cgiOut,
"<!-- File Entry -->\n");
- if(js) fprintf(cgiOut,
- "<TR BGCOLOR=\"#%s\" onMouseOver=\"this.bgColor='#%s';\" onMouseOut=\"this.bgColor='#%s';\">\n",
- linecolor, HL_COLOR, linecolor);
+ fprintf(cgiOut,
+ "<TR BGCOLOR=\"#%s\" ", linecolor);
+
+ if(js)
+ fprintf(cgiOut, "onMouseOver=\"this.bgColor='#%s';\" onMouseOut=\"this.bgColor='#%s';\">\n",
+ HL_COLOR, linecolor);
fprintf(cgiOut,
- "<TD NOWRAP ALIGN=\"LEFT\"><INPUT TYPE=\"CHECKBOX\" NAME=\"multiselect_filename\" STYLE=\"border: none;\" VALUE=\"%s\">"
+ "><TD NOWRAP ALIGN=\"LEFT\"><INPUT TYPE=\"CHECKBOX\" NAME=\"multiselect_filename\" STYLE=\"border: none;\" VALUE=\"%s\">"
"<A HREF=\"%s?action=%s&amp;directory=%s&amp;filename=%s&amp;token=%s\" TITLE=\"Open '%s'\">%s %s</A></TD>\n",
name, cgiScriptName, (edit_by_default && editable) ? "edit" : "sendfile", virt_dirname, name, token, name, icon, name);