* Made the iconbar room list somewhat usable (collapse/expand). It is not yet
authorArt Cancro <ajc@citadel.org>
Tue, 29 Nov 2005 04:04:32 +0000 (04:04 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 29 Nov 2005 04:04:32 +0000 (04:04 +0000)
  a drop target, though, which is why we did all this in the first place.

webcit/ChangeLog
webcit/context_loop.c
webcit/gettext.c
webcit/roomops.c
webcit/static/wclib.js
webcit/static/webcit.css

index 4eb2e775470f23de0453844a272f261ab45a961c..288be7d18d39a62b1e7d186a5e608b63c12896fd 100644 (file)
@@ -1,5 +1,9 @@
 $Id$
 
+Mon Nov 28 23:04:13 EST 2005 ajc
+* Made the iconbar room list somewhat usable (collapse/expand).  It is not yet
+  a drop target, though, which is why we did all this in the first place.
+
 Mon Nov 27 21:28:03 CET 2005 dothebart
 * migrate to _GNU_SOURCE and uselocale() to be threadsafe.
        
index aa2863895184b461f9a2caefb80adaacfbf90489..b4d15e1ab89d3fbb6bff9f2f49100771f65a6fda 100644 (file)
@@ -290,9 +290,9 @@ void context_loop(int sock)
                        if_modified_since = httpdate_to_timestamp(&buf[19]);
                }
 
-               if (!strncasecmp(buf, "Accept-Language: ", 17)) {
+               /*if (!strncasecmp(buf, "Accept-Language: ", 17)) {
                        httplang_to_locale(&buf[17]);
-               }
+               }*/
 
                /*
                 * Read in the request
index 6fd2a96e5d982e1c71ddf537e3d8e4567f19decf..f5e5a331b551fca01ae823dea5fa9478542f46bf 100644 (file)
@@ -60,7 +60,7 @@ void httplang_to_locale(const char* LocaleString)
                                                                                strlen(wanted_locales[i]));
                                        if (!ret)
                                                {
-                                                       locale=(char*)AvailLang[j];//wanted_locales[i];
+                                                       locale=(char*)AvailLang[j]; //wanted_locales[i];
                                                        i=nFound+1;
                                                        j=nAvail+1;
                                                        continue;
index 6351ddfa7815b3685924853a25692f7251e9bcfa..7a1131929f186e0c655a38d7f6275fd4dcd53484 100644 (file)
@@ -2560,14 +2560,18 @@ void do_iconbar_view(struct folder *fold, int max_folders, int num_floors) {
                   && (strlen(old_floor_name) > 0) ) {
                        /* End inner box */
                        wprintf("<br>\n");
+                       wprintf("</div>\n");    /* nfmd */
                }
                strcpy(old_floor_name, floor_name);
 
                if (levels == 1) {
-                       /* Begin inner box */
+                       /* Begin floor */
                        stresc(boxtitle, floor_name, 1, 0);
                        svprintf("BOXTITLE", WCS_STRING, boxtitle);
-                       wprintf("<span class=\"ib_roomlist_floor\">%s</span><br>\n", boxtitle);
+                       wprintf("<span class=\"ib_roomlist_floor\" "
+                               "onClick=\"expand_floor('nfmd%d')\">"
+                               "%s</span><br>\n", i, boxtitle);
+                       wprintf("<div id=\"nfmd%d\" style=\"display:none\">", i);
                }
 
                oldlevels = levels;
@@ -2604,6 +2608,7 @@ void do_iconbar_view(struct folder *fold, int max_folders, int num_floors) {
                        wprintf("<br />\n");
                }
        }
+       wprintf("</div>\n");    /* nfmd */
 }
 
 
index a3bb8adeb89347b7176cf6fcdd188bc281492c2e..2464fff089c58586d989355d395310fd71cc7adf 100644 (file)
@@ -358,9 +358,18 @@ function ctdl_ts_getInnerText(el) {
 
 // icon bar toggler tabs...
 
+var which_div_expanded = null;
+
 function switch_to_room_list() {
        new Ajax.Updater('iconbar', 'iconbar_ajax_rooms', { method: 'get' } );
-       fuckitup();
+}
+
+function expand_floor(floor_div) {
+       if (which_div_expanded != null) {
+               $(which_div_expanded).style.display = 'none' ;
+       }
+       $(floor_div).style.display = 'block';
+       which_div_expanded = floor_div;
 }
 
 function switch_to_menu_buttons() {
index dce6fd6dd2d1af136966ef838d6fb9449547a8ef..c41b21c7f9fbf8ba729c037736467ab97012e436 100644 (file)
@@ -350,17 +350,20 @@ a:hover {
        font-size: 8pt;
        font-weight: bold;
        color: #000000;
+       cursor: pointer;
 }
 
 .ib_roomlist_new {
        font-size: 6pt;
        color: #880000;
        font-weight: bold;
+       cursor: pointer;
 }
 
 .ib_roomlist_old {
        font-size: 6pt;
        color: #000088;
+       cursor: pointer;
 }
 
 .mailbox_summary {