From 6b8835e55dc3c87872194dcf03ae42670aa53ae0 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 27 Apr 2008 03:54:48 +0000 Subject: [PATCH] Added (non-functional) drag bars and delete buttons to the new sticky notes --- webcit/notes.c | 46 +++++++++++++++++++++++++++++++++------- webcit/static/webcit.css | 16 ++++++++++++++ 2 files changed, 54 insertions(+), 8 deletions(-) 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 diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index dc68ca10e..ed5efa299 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -1322,3 +1322,19 @@ li.event_unread span, a.event_read_title { padding: 4px; } +.stickynote_outer { + position: relative; + width: 200px; + height: 200px; + border: 1px solid black; + background-color: #ffff00; +} + +.stickynote_titlebar { + position: relative; + width: 100%; + height: 15px; + top: 0px; + left: 0px; + background-color: #888800; +} -- 2.30.2