* wclib.js: transmit the "no floors expanded" condition to the server.
authorArt Cancro <ajc@citadel.org>
Sun, 11 Dec 2005 01:49:20 +0000 (01:49 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 11 Dec 2005 01:49:20 +0000 (01:49 +0000)
webcit/ChangeLog
webcit/static/wclib.js

index d2b6ff59907ccdde5878ca39122faba0427151d6..033a2458c24afaa0a10c5ee64958c65e5d03c428 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Sat Dec 10 20:48:40 EST 2005 ajc
+* wclib.js: transmit the "no floors expanded" condition to the server.
+
 Sat Dec 10 17:44:51 EST 2005 ajc
 * Switched our TinyMCE call to the "advanced" theme.  Also enabled
   the IESpell plugin (when Internet Explorer is in use).
index 8eedfcde19ca5a1167992cc7ad64d924031deb73..b56ab0bfa62fbba83933bd566da54aa52a1bbb68 100644 (file)
@@ -71,14 +71,25 @@ function expand_floor(floor_div) {
                        $(which_div_expanded).style.display = 'none' ;
                }
        }
+
+       // clicking on the already-expanded floor causes the whole list to collapse
        if (which_div_expanded == floor_div) {
                which_div_expanded = null;
+
+               // notify the server that no floors are expanded
+               new Ajax.Request(
+                       'set_floordiv_expanded/-1', {
+                               method: 'post'
+                       }
+               );
                return true;
        }
+
+       // expand the requested floor
        $(floor_div).style.display = 'block';
        which_div_expanded = floor_div;
 
-       // notify the server of what we did
+       // notify the server of which floor is expanded
        new Ajax.Request(
                'set_floordiv_expanded/'+floor_div, {
                        method: 'post'