From: Art Cancro Date: Fri, 13 May 2011 02:11:40 +0000 (-0400) Subject: Use the same method in both places to determine whether the wholist in the iconbar... X-Git-Tag: v8.11~759 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=882c0a4274a87a3e3cc9c72c9034cd85d9985b64 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. --- 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;