$Log$
+Revision 602.5 2005/02/19 05:22:00 ajc
+* Replaced all the "centered 99% tables" with 100% width tables wrapped
+ inside a div with margin-right:1px to remove the horizontal scrollbar
+ in Gecko without creating whitespace. IE6's problem is much more
+ serious and will require dropping a nuclear bomb on Redmond to fix.
+
Revision 602.4 2005/02/18 05:09:52 ajc
* Moved the room access control screen into a tab on the edit room menu
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
return;
}
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<center>");
strcpy(user, &buf[4]);
wprintf("<br />\n");
wprintf("</CENTER>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
strcpy(WC->ImportantMessage, "");
}
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<CENTER><br />");
serv_puts("MESG changepw");
" "
"<INPUT type=\"submit\" name=\"action\" value=\"Cancel\">\n");
wprintf("</form></center>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/save_task\">\n");
wprintf("<INPUT TYPE=\"hidden\" NAME=\"msgnum\" VALUE=\"%ld\">\n",
wprintf("</FORM>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
if (created_new_vtodo) {
}
/* Outer table (to get the background color) */
- wprintf("<center>"
- "<TABLE width=99%% border=0 cellpadding=0 cellspacing=0 "
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
"bgcolor=#204B78><TR><TD>\n");
wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0><tr>\n");
wprintf("</TABLE>" /* end of inner table */
"</TD></TR></TABLE>" /* end of outer table */
- "</CENTER>\n");
+ "</div>\n");
}
int all_day_event = 0;
if (WC->num_cal == 0) {
- wprintf("<br /><br /><br />\n");
+ // FIXME wprintf("<br /><br /><br />\n");
return;
}
/* Outer table (to get the background color) */
- wprintf("<center>"
- "<TABLE width=99%% border=0 cellpadding=0 cellspacing=0 "
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
"bgcolor=#204B78><TR><TD>\n");
/* Inner table (the real one) */
wprintf("</TR></TABLE>" /* end of inner table */
- "</TD></TR></TABLE></center>" /* end of outer table */
+ "</TD></TR></TABLE></div>" /* end of outer table */
);
char buf[SIZ];
icalproperty *p;
- wprintf("<center><table border=0 cellspacing=0 width=99%% bgcolor=\"#FFFFFF\">\n<tr>\n"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 cellspacing=0 width=100%% bgcolor=\"#FFFFFF\">\n<tr>\n"
"<TH>Name of task</TH>\n"
"<TH>Date due</TH></TR>\n"
);
wprintf(">%s</FONT></TD></TR>\n", buf);
}
- wprintf("</table></center>\n");
+ wprintf("</table></div>\n");
/* Free the list */
free_calendar_buffer();
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
/************************************************************
* Uncomment this to see the UID in calendar events for debugging
"</script>\n"
);
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
if (created_new_vevent) {
return;
}
- wprintf("<center><TABLE BORDER=1 WIDTH=99%% bgcolor=\"#ffffff\">\n"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE BORDER=1 WIDTH=100%% bgcolor=\"#ffffff\">\n"
"<TR><TH>Floor number</TH>"
"<TH>Floor name</TH>"
"<TH>Number of rooms</TH></TR>\n"
"</FORM></TD>"
"<TD> </TD></TR>\n");
- wprintf("</table></center>\n");
+ wprintf("</table></div>\n");
wDumpContent(1);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<CENTER>\n");
wprintf("<INPUT TYPE=\"SUBMIT\" NAME=\"sc\" VALUE=\"Cancel\">\n");
wprintf("</FORM>\n");
wprintf("</CENTER>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
if (ib_citadel) if (ib_displayas != IB_TEXTONLY) wprintf(
"<li><div align=\"center\">"
"<A HREF=\"http://www.citadel.org\" "
- "title=\"Find out more about Citadel\" target=\"aboutcit\" "
+ "title=\"Find out more about Citadel\" target=\"aboutcit\">"
"<img border=\"0\" width=\"48\" height=\"48\" "
"SRC=\"/static/citadel-logo.gif\" ALT=\"CITADEL\">"
"CITADEL</A>"
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/commit_iconbar\">\n");
"</CENTER></FORM>\n"
);
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(2);
}
wprintf("</TD></TR></TABLE>\n");
wprintf("</div>\n<div id=\"content\">\n");
- wprintf("<center><table border=0 width=99%%><tr><td valign=top>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%%><tr><td valign=top>\n");
for (which=0; which<ic_max; ++which) {
if (which == (ic_max / 2)) {
wprintf("</TD><TD VALIGN=TOP>");
"</TD></TR></TABLE></FORM>\n");
do_template("endbox");
}
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
for (i=0; i<ic_max; ++i) {
{
output_headers(1, 1, 1, 0, 0, 0, 0);
- wprintf("<center><TABLE WIDTH=99%%>"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE WIDTH=100%%>"
"<TR><TD COLSPAN=2>\n");
svprintf("BOXTITLE", WCS_STRING, "Basic commands");
do_template("endbox");
- wprintf("</td></tr></table></center>");
+ wprintf("</td></tr></table></div>");
wDumpContent(2);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%%><tr valign=top><td>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%%><tr valign=top><td>");
svprintf("BOXTITLE", WCS_STRING, "Global Configuration");
do_template("beginbox");
do_template("endbox");
- wprintf("</td></tr></table></center>");
+ wprintf("</td></tr></table></div>");
wDumpContent(2);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<CENTER>");
wprintf("This screen allows you to enter Citadel server commands which are\n");
wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><br />\n");
wprintf("</FORM></CENTER>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
}
/* begin everythingamundo table */
- wprintf("<center><table width=99%% border=1 cellspacing=0 "
+ wprintf("<div style=\"margin-right:1px\">\n");
+ wprintf("<table width=100%% border=1 cellspacing=0 "
"cellpadding=0><TR><TD>\n");
/* begin message header table */
wprintf("</TD></TR></TABLE>\n");
/* end everythingamundo table */
- wprintf("</TD></TR></TABLE></center><br />\n");
+ wprintf("</TD></TR></TABLE>\n");
+ wprintf("</div>\n");
}
wprintf("<FORM NAME=\"msgomatic\" "
"METHOD=\"POST\" ACTION=\"/do_stuff_to_msgs\">\n");
if (is_summary) {
- wprintf(
- "<center><table border=0 cellspacing=0 "
- "cellpadding=0 width=99%%>\n"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 cellspacing=0 "
+ "cellpadding=0 width=100%%>\n"
"<TR>"
"<TD><I>Subject</I></TD>"
"<TD><I>Sender</I></TD>"
}
if (is_summary) {
- wprintf("</table></center>\n");
+ wprintf("</table></div>\n");
}
/* Bump these because although we're thinking in zero base, the user
if (num_displayed == 1) {
if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
- wprintf("<CENTER>"
- "<TABLE BORDER=0 WIDTH=99%% BGCOLOR=\"#DDDDDD\"><TR><TD>"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#dddddd\"><tr><td>"
"Reading #%d of %d messages.</TD>\n"
"<TD ALIGN=RIGHT><FONT SIZE=+1>",
lowest_displayed, nummsgs);
oper,
WC->msgarr[0]);
+ wprintf("</td></tr></table></div>\n");
}
}
"<input type=\"submit\" name=\"sc\" value=\"Cancel\">\n");
/* begin richedit box */
- wprintf("<div style=\"position:absolute; left:0%%; width:100%%; top:15%; height:80%%\">\n");
+ wprintf("<div style=\"position:absolute; left:0%%; width:100%%; "
+ "top:15%; height:75%%\">\n");
wprintf("<script type=\"text/javascript\" "
"src=\"static/richtext.js\"></script>\n"
wprintf("<div style=\"position:absolute; bottom:0px; left:0px; width:100%%\">\n");
/* Enumerate any attachments which are already in place... */
+ wprintf("<img src=\"/static/attachment.gif\" border=0 "
+ "align=middle height=16 width=16> Attachments: ");
+ wprintf("<select name=\"which_attachment\" size=1>");
for (att = WC->first_attachment; att != NULL; att = att->next) {
- wprintf("<IMG SRC=\"/static/attachment.gif\" "
- "BORDER=0 ALIGN=MIDDLE> Attachment: ");
+ wprintf("<option value=\"");
+ urlescputs(att->filename);
+ wprintf("\">");
escputs(att->filename);
- wprintf(" (%s, %d bytes)<br />\n",
- att->content_type, att->length);
+ /* wprintf(" (%s, %d bytes)",att->content_type,att->length); */
+ wprintf("</option>\n");
}
+ wprintf("</select>");
/* Now offer the ability to attach additional files... */
wprintf(" "
"Attach file: <input NAME=\"attachfile\" "
- "SIZE=48 TYPE=\"file\">\n "
+ "SIZE=16 TYPE=\"file\">\n "
"<input type=\"submit\" name=\"attach\" value=\"Add\">\n");
wprintf("</div>\n"); /* end attachments section */
output_headers(1, 1, 1, 0, 0, 0, 0);
- wprintf("<center><table width=99%% border=0 bgcolor=\"#444455\"><tr><td>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table width=100%% border=0 bgcolor=\"#444455\"><tr><td>");
wprintf("<font size=+1 color=\"#ffffff\"");
wprintf("<b>Confirm move of message</b>\n");
- wprintf("</font></td></tr></table></center>\n");
+ wprintf("</font></td></tr></table></div>\n");
wprintf("<CENTER>");
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("Send an instant message to: ");
escputs(recp);
wprintf("<br /><A HREF=\"javascript:window.close();\"Cancel</A>\n");
wprintf("</FORM></CENTER>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
output_headers(1, 1, 1, 0, 0, 0, 0);
/* print the tabbed dialog */
- wprintf("<br /><center><TABLE border=0 cellspacing=0 cellpadding=0 width=99%%>"
+ wprintf("<br />"
+ "<div style=\"margin-right:1px\">"
+ "<TABLE border=0 cellspacing=0 cellpadding=0 width=100%%>"
"<TR ALIGN=CENTER>"
"<TD> </TD>\n");
wprintf("<TD> </TD>\n");
- wprintf("</TR></TABLE>\n");
+ wprintf("</TR></TABLE></div>\n");
/* end tabbed dialog */
/* begin content of whatever tab is open now */
- wprintf("<TABLE border=0 width=99%% bgcolor=\"#FFFFFF\">\n"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE border=0 width=100%% bgcolor=\"#FFFFFF\">\n"
"<TR><TD>\n");
if (!strcmp(tab, "admin")) {
}
/* end content of whatever tab is open now */
- wprintf("</TD></TR></TABLE>\n");
+ wprintf("</TD></TR></TABLE></div>\n");
wDumpContent(1);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/entroom\">\n");
if (buf[0] == '1') {
fmout(NULL, "CENTER");
}
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>");
whichmenu = bstr("whichmenu");
wprintf(" ");
wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">\n");
wprintf("</CENTER></FORM>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
* not people I consider worthwhile, I still want them to use WebCit.
*/
- wprintf("<center><table border=0 width=99%%><tr valign=top>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%%><tr valign=top>");
/*
* Column One
/*
* End of columns
*/
- wprintf("</td></tr></table></center>\n");
-
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
wprintf("</SPAN></TD></TR></TABLE>\n");
wprintf("</div>\n<div id=\"content\">\n");
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/edituser\">\n"
"<INPUT TYPE=\"hidden\" NAME=\"username\" VALUE=\"");
escputs(username);
"<br /><br /></FORM>\n");
wprintf("</CENTER>\n");
- wprintf("</td></tr></table></center>\n");
-
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
goto DONE;
}
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
extract_long(buf, 4), extract_long(buf, 5));
}
- wprintf("</table></center>\n");
+ wprintf("</table></div>\n");
DONE: wDumpContent(1);
}
"</div>\n<div id=\"content\">\n"
);
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
serv_printf("OIMG _userpic_|%s", who);
serv_gets(buf);
escputs(who);
wprintf("</A>\n");
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
);
wprintf("<FORM METHOD=\"POST\" ACTION=\"/submit_vcard\">\n");
- wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<TABLE border=0><TR>"
"<TD>Prefix</TD>"
"</CENTER></FORM>\n"
);
- wprintf("</td></tr></table></center>\n");
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}
wprintf("</div>\n"
"<div id=\"content\">\n");
- wprintf("<center>"
- "<table border=0 cellspacing=0 width=99%% bgcolor=\"#FFFFFF\">"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 cellspacing=0 width=100%% bgcolor=\"#FFFFFF\">"
"<tr>\n");
wprintf("<TH COLSPAN=4>Session ID</TH>\n");
wprintf("<TH>User Name</TH>\n");
wprintf("</TD>\n</TR>");
}
}
- wprintf("</TABLE>\n"
+ wprintf("</TABLE></div>\n"
+ "<div align=center>"
"Click on a name to read user info. Click on "
"<IMG ALIGN=MIDDLE SRC=\"/static/page.gif\" ALT=\"(p)\" "
"BORDER=0> to send "
- "a page (instant message) to that user.<br /></CENTER>\n");
+ "a page (instant message) to that user.</div>\n");
wDumpContent(1);
}