From b0e2b56c7fe715f2d48faeb740437db8d51641b5 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 11 Dec 2005 01:49:20 +0000 Subject: [PATCH] * wclib.js: transmit the "no floors expanded" condition to the server. --- webcit/ChangeLog | 3 +++ webcit/static/wclib.js | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index d2b6ff599..033a2458c 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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). diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 8eedfcde1..b56ab0bfa 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -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' -- 2.39.2