Added code to activate color selection in javascript.
[citadel.git] / webcit / static / wclib.js
index 41d8232fe5ba3be285836e94616d5bf777402d50..5ff50ab0e2dabe34b8baeca4ac8c8c9584983c25 100644 (file)
@@ -497,6 +497,8 @@ function NotesDragMouseDown(evt, uid) {
 }
 
 
+// Called when the user clicks on the palette icon of a sticky note to change its color.
+// It toggles the color selector visible or invisible.
 
 function NotesClickPalette(evt, uid) {
        uid_of_note_being_colored = uid;
@@ -518,6 +520,18 @@ function NotesClickPalette(evt, uid) {
 }
 
 
+// Called when the user clicks on one of the colors in an open color selector.
+// Sets the desired color and then closes the color selector.
+
+function NotesClickColor(evt, uid, red, green, blue) {
+       uid_of_note_being_colored = uid;
+       d = $('palette-' + uid_of_note_being_colored);
+
+       alert('FIXME red=' + red + ' green=' + green + ' blue=' + blue);
+
+       d.style.display = 'none';
+}
+