From 486fe78f4d6aefd8e6b3935dc046f735056cc756 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 15 Feb 2005 05:20:45 +0000 Subject: [PATCH] * Fixed an HTTP output error for static data which was causing images to display improperly in Konqueror * Changed most of the beginbox_nt boxes to centered tables with 99% width, to avoid the mysterious horizontal scrollbar --- webcit/ChangeLog | 7 +++++++ webcit/calendar.c | 6 +++--- webcit/calendar_view.c | 9 ++------- webcit/event.c | 4 ++-- webcit/iconbar.c | 20 +++++++++++++------- webcit/siteconfig.c | 18 +++++++++++------- webcit/useredit.c | 4 ++-- webcit/vcard_edit.c | 27 +++++++++++++++++---------- webcit/webcit.c | 4 ++-- webcit/webcit.h | 1 + 10 files changed, 60 insertions(+), 40 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 325d4952d..8ed520c49 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,10 @@ $Log$ +Revision 601.3 2005/02/15 05:20:44 ajc +* Fixed an HTTP output error for static data which was causing images + to display improperly in Konqueror +* Changed most of the beginbox_nt boxes to centered tables with 99% + width, to avoid the mysterious horizontal scrollbar + Revision 601.2 2005/02/14 04:57:23 ajc * Started changing some of the top-level tables from 100% width to 99% width in order to keep the b0rken CSS box-model from displaying a @@ -2349,3 +2355,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/calendar.c b/webcit/calendar.c index 46e00bdad..370275860 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -528,9 +528,9 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) { "\n" "\n
\n" ); - - do_template("beginbox_nt"); + wprintf("
"); + wprintf("
\n"); wprintf("\n", msgnum); @@ -588,7 +588,7 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) { wprintf("
\n"); - do_template("endbox"); + wprintf("
\n"); wDumpContent(1); if (created_new_vtodo) { diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 1dfbf351d..93a7d4059 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -623,9 +623,7 @@ void do_tasks_view(void) { char buf[SIZ]; icalproperty *p; - do_template("beginbox_nt"); - - wprintf("\n\n" + wprintf("
\n\n" "\n" "\n" ); @@ -667,10 +665,7 @@ void do_tasks_view(void) { wprintf(">%s\n", buf); } - wprintf("
Name of taskDate due
\n"); - - do_template("endbox"); - + wprintf("\n"); /* Free the list */ free_calendar_buffer(); diff --git a/webcit/event.c b/webcit/event.c index 819cf6210..832bac7a4 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -92,7 +92,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) "
\n
\n" ); - do_template("beginbox_nt"); + wprintf("
\n"); /************************************************************ * Uncomment this to see the UID in calendar events for debugging @@ -401,7 +401,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) "\n" ); - do_template("endbox"); + wprintf("
\n"); wDumpContent(1); if (created_new_vevent) { diff --git a/webcit/iconbar.c b/webcit/iconbar.c index 8c762f857..293e62d44 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -347,9 +347,15 @@ void display_customize_iconbar(void) { if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value); } - output_headers(1, 1, 0, 0, 0, 0, 0); - svprintf("BOXTITLE", WCS_STRING, "Customize the icon bar"); - do_template("beginbox"); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n" + "
" + "Customize the icon bar" + "
\n" + "
\n
\n" + ); + + wprintf("
"); wprintf("
\n"); @@ -548,7 +554,7 @@ void display_customize_iconbar(void) { "
\n" ); - do_template("endbox"); + wprintf("
\n"); wDumpContent(2); } @@ -593,13 +599,13 @@ void commit_iconbar(void) { set_preference("iconbar", iconbar); output_headers(1, 1, 0, 0, 0, 0, 0); - do_template("beginbox_nt"); wprintf( + "
" "" " " "Your icon bar has been updated. Please select any of its " - "choices to continue.\n" + "choices to continue." + "
\n" ); - do_template("endbox"); wDumpContent(2); } diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 1e3e1479c..25bc8bebf 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -43,12 +43,17 @@ void display_siteconfig(void) int mboxpolicy = 0; int mboxvalue = 0; - output_headers(1, 1, 0, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n" + "
" + "Site configuration" + "
\n" + "
\n
\n" + ); - whichmenu = bstr("whichmenu"); + wprintf("
"); - svprintf("BOXTITLE", WCS_STRING, "Site configuration"); - do_template("beginbox_nt"); + whichmenu = bstr("whichmenu"); if (!strcmp(whichmenu, "")) { wprintf("\n"); @@ -120,8 +125,7 @@ void display_siteconfig(void) ); wprintf("
"); - - do_template("endbox"); + wprintf("
\n"); wDumpContent(1); return; } @@ -659,7 +663,7 @@ void display_siteconfig(void) wprintf(" "); wprintf("\n"); wprintf("
\n"); - do_template("endbox"); + wprintf("\n"); wDumpContent(1); } diff --git a/webcit/useredit.c b/webcit/useredit.c index 38a1d5c2d..46fb4d28a 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -290,7 +290,7 @@ void display_edituser(char *supplied_username, int is_new) { wprintf("\n"); wprintf("
\n
\n"); - do_template("beginbox_nt"); + wprintf("
\n"); wprintf("
\n" "
\n"); wprintf("\n"); - do_template("endbox"); + wprintf("
\n"); wDumpContent(1); diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 9397082a8..f8be5b9a1 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -77,8 +77,6 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { other_inetemail[0] = 0; extrafields[0] = 0; - output_headers(1, 1, 0, 0, 0, 0, 0); - strcpy(whatuser, ""); if (msgnum >= 0) { @@ -86,7 +84,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { serv_puts(buf); serv_gets(buf); if (buf[0] != '1') { - wDumpContent(1); + convenience_page("770000", "Error", &buf[4]); return; } while (serv_gets(buf), strcmp(buf, "000")) { @@ -103,7 +101,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { serv_puts(buf); serv_gets(buf); if (buf[0] != '2') { - wDumpContent(1); + convenience_page("770000", "Error", &buf[4]); return; } @@ -175,12 +173,21 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { } /* Display the form */ - do_template("beginbox_nt"); - wprintf("
\n"); - wprintf("

" - "Contact information for "); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n" + "
" + "" + "" + "Contact information for " + ); escputs(whatuser); - wprintf("\n"); + wprintf("" + "
\n" + "
\n
\n" + ); + + wprintf("\n"); + wprintf("
\n"); wprintf("" "" @@ -269,7 +276,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { "\n" ); - do_template("endbox"); + wprintf("
Prefix
\n"); wDumpContent(1); } diff --git a/webcit/webcit.c b/webcit/webcit.c index 7fdf3a8a7..b96104fdd 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -345,7 +345,7 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers int do_room_banner, /* 0=no, 1=yes, */ /* 2 = I'm going to embed my own, so don't open the */ - /*
either. */ + /*
either. */ int unset_cookies, /* 1 = session is terminating, so unset the cookies */ int refresh30, /* 1 = automatically refresh page every 30 seconds */ @@ -416,7 +416,7 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers } } - if (do_room_banner != 2) { + if (do_room_banner == 1) { wprintf("
\n"); diff --git a/webcit/webcit.h b/webcit/webcit.h index c89f5a59f..7ebf6266b 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -410,6 +410,7 @@ int is_msg_in_mset(char *mset, long msgnum); char *safestrncpy(char *dest, const char *src, size_t n); void display_addressbook(long msgnum, char alpha); void offer_start_page(void); +void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext); void change_start_page(void); void output_html(void); void display_floorconfig(char *); -- 2.39.2