--- /dev/null
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <ctype.h>
+
+
+void rgb(int red, int green, int blue)
+{
+ printf(" \"#%02x%02x%02x\",\n", red, green, blue);
+}
+
+
+main()
+{
+ int pastel = 223; // try 191 if color depth is shallow
+
+ rgb (pastel, pastel, pastel); // pastel grey
+ rgb (255, pastel, pastel); // pastel red
+ rgb (pastel, pastel, 255); // pastel blue
+ rgb (255, 255, pastel); // pastel yellow
+ rgb (pastel, 255, pastel); // pastel green
+ rgb (255, pastel, 255); // pastel magenta
+ rgb (pastel, 255, 255); // pastel cyan
+ rgb (255, pastel, 2*pastel-255); // pastel orange
+ rgb (pastel, 2*pastel-255, 2*pastel-255); // pastel brown
+
+}
#include "groupdav.h"
#include "webserver.h"
+char *pastel_palette[] = {
+ "#dfdfdf",
+ "#ffdfdf",
+ "#dfdfff",
+ "#ffffdf",
+ "#dfffdf",
+ "#ffdfff",
+ "#dfffff",
+ "#ffdfbf",
+ "#dfbfbf"
+};
+
+
/*
* Display a <div> containing a rendered sticky note.
*/
void display_vnote_div(struct vnote *v) {
+ int i;
/* begin outer div */
wprintf("<table border=0 cellpadding=0 cellspacing=0 valign=middle width=100%%><tr>");
wprintf("<td align=left valign=middle>");
- wprintf("<img onclick=\"alert('FIXME');\" ");
+ wprintf("<img onclick=\"$('palette-%s').style.display = 'block';\" ", v->uid);
wprintf("src=\"static/8paint16.gif\">");
+
+ /* embed color selector */
+ wprintf("<div id=\"palette-%s\" ", v->uid);
+ wprintf("class=\"stickynote_palette\" ");
+ wprintf("style=\"display:none;\" >");
+ wprintf("<table border=0 cellpadding=0 cellspacing=0>");
+ for (i=0; i<9; ++i) {
+ if ((i%3)==0) wprintf("<tr>");
+ wprintf("<td bgcolor=\"%s\"> </td>", pastel_palette[i]);
+ if (((i+1)%3)==0) wprintf("</tr>");
+ }
+ wprintf("</table>");
+ wprintf("</div>");
+
wprintf("</td>");
- wprintf("<td></td>"); // nothing in the title bar, it's just for dragging
+ wprintf("<td></td>"); // nothing in the title bar, it's just for resizing
wprintf("<td align=right valign=middle>");
wprintf("<img onclick=\"DeleteStickyNote(event,'%s','%s')\" ", v->uid, _("Delete this note?") );
right: 0px;
bottom: 0px;
}
+
+.stickynote_palette {
+ position: absolute;
+ width: 48px;
+ height: 48px;
+ background-color: #ffffff;
+}
+
+.stickynote_palette table {
+ margin: 0;
+ padding: 0;
+}
+
+.stickynote_palette td {
+ width: 16px;
+ height: 16px;
+ filter:alpha(opacity=100);
+ -moz-opacity:1.0;
+ opacity: 1.0;
+}