X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fnotes.c;h=cea7121d5a377759edb545792649a84701d840f7;hb=6b8835e55dc3c87872194dcf03ae42670aa53ae0;hp=a3afe01809839e887753fe0bc4a5cd2de43830e7;hpb=6056e0278cc5a6d17d082a01151c8ef3065992db;p=citadel.git diff --git a/webcit/notes.c b/webcit/notes.c index a3afe0180..cea7121d5 100644 --- a/webcit/notes.c +++ b/webcit/notes.c @@ -7,6 +7,17 @@ #include "groupdav.h" #include "webserver.h" + +/* + * Uncomment this #define in order to get the new vNote-based sticky notes view. + * We're keeping both versions here so that I can work on the new view without breaking + * the existing implementation prior to completion. + */ + +/* #define NEW_NOTES_VIEW */ + + +#ifndef NEW_NOTES_VIEW /* * display sticky notes * @@ -89,6 +100,7 @@ void display_note(long msgnum, int unread) ); } } +#endif /* @@ -147,27 +159,43 @@ void updatenote(void) } - - - - - +#ifdef NEW_NOTES_VIEW /* * Display a
containing a rendered sticky note. */ void display_vnote_div(struct vnote *v, long msgnum) { + /* begin outer div */ + wprintf("
pos_left); wprintf("top: %dpx; ", v->pos_top); wprintf("width: %dpx; ", v->pos_width); wprintf("height: %dpx; ", v->pos_height); - wprintf("border: 1px solid black; "); wprintf("background-color: #%02X%02X%02X ", v->color_red, v->color_green, v->color_blue); wprintf("\">"); + /* begin title bar */ + + wprintf("
color_red/2, v->color_green/2, v->color_blue/2); + wprintf("\">"); + + wprintf(""); + wprintf("", msgnum); + + wprintf("
 "); + wprintf("
"); + + wprintf("
\n"); + escputs(v->body); wprintf("
\n"); @@ -181,7 +209,7 @@ void display_vnote_div(struct vnote *v, long msgnum) { * * msgnum = Message number on the local server of the note to be displayed */ -void display_note_NEW(long msgnum, int unread) { +void display_note(long msgnum, int unread) { char buf[1024]; char mime_partnum[256]; char mime_filename[256]; @@ -229,3 +257,5 @@ void display_note_NEW(long msgnum, int unread) { } } } + +#endif