* First cut of message list resize. It works but it resizes on mouseup.
authorArt Cancro <ajc@citadel.org>
Tue, 8 Nov 2005 05:37:30 +0000 (05:37 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 8 Nov 2005 05:37:30 +0000 (05:37 +0000)
webcit/ChangeLog
webcit/iconbar.c
webcit/messages.c
webcit/static/wclib.js
webcit/static/webcit.css

index 4f048e28b35abae310eb9bf21eb475276c4e0ab5..82fc2efdaae59c1f2b79df42b79ee075da135838 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Tue Nov  8 00:36:46 EST 2005 ajc
+* First cut of message list resize.  It works but it resizes on mouseup.
+
 Mon Nov  7 10:45:18 EST 2005 ajc
 * Disable the I-bar cursor when hovering over message summary lines in the
   mailbox view; go with the default pointer instead. 
index 8090c1c2ca6c8c505d6057cec376d2c1d32bccd4..b67711ed90c9056ad609d018c395a417872b5279 100644 (file)
@@ -305,8 +305,8 @@ void do_iconbar(void) {
                _("customize this menu")
        );
 
-       wprintf("</ul>\n"
-               "</div>\n");
+       wprintf("</ul>\n");
+       wprintf("</div>\n");
 }
 
 
index 455207e75bc26014546a7102389c7e02266e7ab5..b239cd9bc7305d00891857617b7da0dba6a233a6 100644 (file)
@@ -2107,6 +2107,16 @@ void readloop(char *oper)
                        "</div>\n");                    /* end of 'fix_scrollbar_bug' div */
                wprintf("</div>");                      /* end of 'message_list' div */
 
+               /* Here's the grab-it-to-resize-the-message-list widget */
+               wprintf("<div id=\"resize_msglist\" "
+                       "onMouseDown=\"CtdlResizeMsgListMouseDown(event)\">"
+                       "<div id=\"fix_scrollbar_bug\">"
+                       "<table width=100%% border=3 cellspacing=0 "
+                       "bgcolor=\"#ccc\" "
+                       "cellpadding=0><TR><TD> </td></tr></table>"
+                       "</div></div>\n"
+               );
+
                wprintf("<div id=\"preview_pane\">");   /* The preview pane will initially be empty */
        }
 
index c2572b8c74a55698e779b086f5f121a5fbcbe59d..63fcd74525e6d2de46d7b58460263e4d5837ba75 100644 (file)
@@ -6,10 +6,6 @@
 //
 
 
-//
-// This code handles the popups for instant messages.
-//
-
 var browserType;
 
 if (document.layers) {browserType = "nn4"}
@@ -18,6 +14,14 @@ if (window.navigator.userAgent.toLowerCase().match("gecko")) {
        browserType= "gecko"
 }
 
+var ns6=document.getElementById&&!document.all;
+
+
+//
+// This code handles the popups for instant messages.
+//
+
+
 function hide_page_popup() {
        if (browserType == "gecko" )
                document.poppedLayer = eval('document.getElementById(\'page_popup\')');
@@ -157,3 +161,64 @@ function CtdlClearDeletedMsg(msgnum) {
        new Effect.Squish('m'+msgnum);
 }
 
+
+// These functions called when the user down-clicks on the message list resizer bar
+
+var saved_y = 0;
+
+function ml_up(evt) {
+       document.onmouseup = null;
+       if (document.layers) {
+               document.releaseEvents(Event.MOUSEUP);
+       }
+       y = (ns6 ? evt.clientY : event.clientY);
+       increment = y - saved_y;
+
+       // First move the bottom of the message list...
+       d = $('message_list');
+       if (d.offsetHeight){
+               divHeight = d.offsetHeight;
+       }
+       else if (d.style.pixelHeight) {
+               divHeight = d.style.pixelHeight;
+       }
+       d.style.height = (divHeight + increment) + 'px';
+
+       // Then move the top of the preview pane...
+       d = $('preview_pane');
+       if (d.offsetTop){
+               divTop = d.offsetTop;
+       }
+       else if (d.style.pixelTop) {
+               divTop = d.style.pixelTop;
+       }
+       d.style.top = (divTop + increment) + 'px';
+
+       // Resize the bottom of the preview pane...
+       d = $('preview_pane');
+       if (d.offsetHeight){
+               divHeight = d.offsetHeight;
+       }
+       else if (d.style.pixelHeight) {
+               divHeight = d.style.pixelHeight;
+       }
+       d.style.height = (divHeight - increment) + 'px';
+
+       // Then move the top of the slider bar.
+       d = $('resize_msglist');
+       if (d.offsetTop){
+               divTop = d.offsetTop;
+       }
+       else if (d.style.pixelTop) {
+               divTop = d.style.pixelTop;
+       }
+       d.style.top = (divTop + increment) + 'px';
+}
+
+function CtdlResizeMsgListMouseDown(evt) {
+       saved_y = (ns6 ? evt.clientY : event.clientY);
+       document.onmouseup = ml_up;
+       if (document.layers) {
+               document.captureEvents(Event.MOUSEUP);
+       }
+}
index c7a0555a80c29b70d0712b995b60648c28957946..dc605a9d63c6331b4c824adf220f7f02997f2a48 100644 (file)
@@ -43,7 +43,7 @@ body {
        left: 15%;
        width: 85%;
        height: 15%;
-       background: #444455;
+       background: #445;
 }
 
 * html #banner {
@@ -53,7 +53,7 @@ body {
        left: 15%;
        width: 85%;
        height: 15%;
-       background: #444455;
+       background: #445;
 }
 
 #page_popup {
@@ -120,7 +120,7 @@ body {
        width: 85%;
        height: 20%;
        overflow: auto;
-       cursor: default;
+       cursor: pointer;
 }
 
 * html #message_list {
@@ -131,7 +131,29 @@ body {
        width: 85%;
        height: 20%;
        overflow: auto;
-       cursor: default;
+       cursor: pointer;
+}
+
+#resize_msglist {
+       position:fixed;
+       display:block;
+       top: 40%;
+       left: 15%;
+       width: 85%;
+       height: 1%;
+       overflow: none;
+       cursor: s-resize;
+}
+
+* html #resize_msglist {
+       position:absolute;
+       display:block;
+       top: 40%;
+       left: 15%;
+       width: 85%;
+       height: 1%;
+       overflow: none;
+       cursor: s-resize;
 }
 
 #preview_pane {