of translucent; it no longer gets covered up by the in-place editor when the mouse
moves into the div, and it disappears when the palette icon is clicked a second
time. Now all that's left to do is write the selector.
+++ /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;
- int pastel = 191;
-
- 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 "webserver.h"
char *pastel_palette[] = {
- "#bfbfbf",
- "#ffbfbf",
- "#bfbfff",
- "#ffffbf",
- "#bfffbf",
- "#ffbfff",
- "#bfffff",
- "#ffbfbf",
- "#bfbfbf"
+ "#808080",
+ "#ff8080",
+ "#8080ff",
+ "#ffff80",
+ "#80ff80",
+ "#ff80ff",
+ "#80ffff",
+ "#ff8080",
+ "#808080"
};
wprintf("<table border=0 cellpadding=0 cellspacing=0 valign=middle width=100%%><tr>");
wprintf("<td align=left valign=middle>");
- wprintf("<img onclick=\"$('palette-%s').style.display = 'block';\" ", v->uid);
+ wprintf("<img onclick=\"NotesClickPalette(event,'%s')\" ", 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>");
vnote_from_body = vnote_new();
vnote_from_body->uid = strdup(uid_from_headers);
vnote_from_body->color_red = 0xFF;
- vnote_from_body->color_green = 0xFF; // pastel yellow
- vnote_from_body->color_blue = 0xBF;
+ vnote_from_body->color_green = 0xff; // pastel yellow
+ vnote_from_body->color_blue = 0x80;
vnote_from_body->body = malloc(32768);
vnote_from_body->body[0] = 0;
body_len = 0;
v->uid = malloc(128);
generate_uuid(v->uid);
v->color_red = 0xFF;
- v->color_green = 0xFF; // pastel yellow
- v->color_blue = 0xBF;
+ v->color_green = 0xff; // pastel yellow
+ v->color_blue = 0x80;
v->body = strdup(_("Click on any note to edit it."));
write_vnote_to_server(v);
vnote_free(v);
+function NotesClickPalette(evt, uid) {
+ uid_of_note_being_colored = uid;
+ d = $('palette-' + uid_of_note_being_colored);
+
+ if (d.style.display) {
+ if (d.style.display == 'none') {
+ d.style.display = 'block';
+ }
+ else {
+ d.style.display = 'none';
+ }
+ }
+ else {
+ d.style.display = 'block';
+ }
+
+ return true;
+}
+
+
+
+
+
// These functions handle resizing sticky notes by dragging the resize handle
var uid_of_note_being_resized = 0;
position: absolute;
width: 200px;
height: 200px;
- border: 1px solid black;
+ border: 1px solid #333;
background-color: #ffff00;
overflow: hidden;
+ z-index: 10;
}
.stickynote_titlebar {
width: 48px;
height: 48px;
background-color: #ffffff;
+ border: 1px solid #333;
+ z-index: 15;
+ display: none;
}
.stickynote_palette table {
.stickynote_palette td {
width: 16px;
height: 16px;
- filter:alpha(opacity=100);
- -moz-opacity:1.0;
- opacity: 1.0;
}