From 9375cd17fe018e84d6768918ab002c688b9afdb5 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 12 May 2011 22:11:40 -0400 Subject: [PATCH] Use the same method in both places to determine whether the wholist in the iconbar is expanded or collapsed. This prevents it from getting out of sync. --- webcit/static/wclib.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 01057a82b..13a783492 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -899,9 +899,8 @@ function switch_to_lang(new_lang) { function toggle_wholist() { - d = $('online_users').style.display; - - if (d == 'block') { + /* WARNING: VILE, SLEAZY HACK. We determine the state of the box based on the image loaded. */ + if ( $('expand_wholist').src.substring($('expand_wholist').src.length - 12) == "collapse.gif" ) { $('online_users').style.display = 'none'; $('expand_wholist').src = 'static/expand.gif'; wstate=0; -- 2.30.2