* Eliminated the sometimes-wonky resize behavior by changing
authorArt Cancro <ajc@citadel.org>
Mon, 12 May 2008 02:36:05 +0000 (02:36 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 12 May 2008 02:36:05 +0000 (02:36 +0000)
  the resize handle from an <img> tag to a CSS background-image attribute.
* Override the InPlaceEditor hover events in order to eliminate
  that garish highlight effect.

webcit/notes.c
webcit/static/wclib.js
webcit/static/webcit.css

index 5954fd8f09036684f361244d281a63aa2f284d32..47249b5b69c6c93bb34326e3ef13490f5e4d4308 100644 (file)
@@ -103,7 +103,7 @@ void display_vnote_div(struct vnote *v) {
 
        wprintf("<script type=\"text/javascript\">");
        wprintf(" new Ajax.InPlaceEditor('notebody-%s', 'ajax_update_note?note_uid=%s', "
-               "{rows:%d,cols:%d,"
+               "{rows:%d,cols:%d,onEnterHover:false,onLeaveHover:false,"
                "okText:'%s',cancelText:'%s',clickToEditText:'%s'});",
                v->uid,
                v->uid,
@@ -120,11 +120,7 @@ void display_vnote_div(struct vnote *v) {
        wprintf("<div id=\"resize-%s\" ", v->uid);
        wprintf("class=\"stickynote_resize\" ");
        wprintf("onMouseDown=\"NotesResizeMouseDown(event,'%s')\"", v->uid);
-       wprintf(">");
-
-       wprintf("<img src=\"static/resizecorner.png\">");
-
-       wprintf("</div>\n");
+       wprintf("> </div>");
 
        /* end of note */
 
index c5e54251616b93d98c47424e1f5a3f4ce1c1c271..8ef0d63e00871e88c72d93f01dde19a32db60a84 100644 (file)
@@ -585,7 +585,7 @@ function NotesResizeMouseUp(evt) {
        }
 
        uid_of_note_being_resized = '';
-       return true;
+       return false;           // disable the default action
 }
 
 function NotesResizeMouseMove(evt) {
@@ -606,7 +606,7 @@ function NotesResizeMouseMove(evt) {
        saved_x = x;
        saved_y = y;
        note_was_resized = 1;
-       return true;
+       return false;           // disable the default action
 }
 
 
index 858d8a989ff5bb52cba87c7f2856eda587091ba1..48050d3e923705aadeed7c15f635051852fc114f 100644 (file)
@@ -1370,8 +1370,11 @@ li.event_unread span, a.event_read_title {
 
 .stickynote_resize {
        position: absolute;
+       background-image: url('resizecorner.png');
+       height: 16px;
+       width: 16px;
        right: -1px;
-       bottom: -5px;
+       bottom: -1px;
 }
 
 .stickynote_palette {