rem:  if (elem.getAttribute("collapsed") == "true") { if (e.thing == "userlist") { if (sourceObject.TYPE == "IRCChannel") { client.rdf.setTreeRoot("user-list", sourceObject.getGraphResource()); setSelectedNicknames(document.getElementById("user-list"), sourceObject.userlistSelection);  } else { client.rdf.setTreeRoot("user-list", client.rdf.resNullChan); } }  newState = "false"; } else { if ((e.thing == "userlist") && (sourceObject.TYPE == "IRCChannel")) { var rv = getSelectedNicknames(document.getElementById("user-list")); sourceObject.userlistSelection = rv; } newState = "true"; } 
add: var newState = !elem.collapsed; 
context: function cmdToggleUI(e){    var ids = new Array();    switch (e.thing)    {        case "tabstrip":            ids = ["view-tabs"];            break;        case "userlist":            ids = ["main-splitter", "user-list-box"];            break;        case "header":            client.currentObject.prefs["displayHeader"] =                !client.currentObject.prefs["displayHeader"];            return;        case "status":            ids = ["status-bar"];            break;        default:            ASSERT (0,"Unknown element ``" + e.thing +                    "'' passed to onToggleVisibility.");            return;    }    var newState;    var elem = document.getElementById(ids[0]);    var sourceObject = e.sourceObject;    if (elem.getAttribute("collapsed") == "true")    {        if (e.thing == "userlist")        {            if (sourceObject.TYPE == "IRCChannel")            {                client.rdf.setTreeRoot("user-list",                                       sourceObject.getGraphResource());                setSelectedNicknames(document.getElementById("user-list"),                                     sourceObject.userlistSelection);                            }            else            {                client.rdf.setTreeRoot("user-list", client.rdf.resNullChan);            }        }        newState = "false";    }    else    {        if ((e.thing == "userlist") && (sourceObject.TYPE == "IRCChannel"))        {            var rv = getSelectedNicknames(document.getElementById("user-list"));            sourceObject.userlistSelection = rv;        }        newState = "true";    }    for (var i in ids)    {        elem = document.getElementById(ids[i]);        elem.setAttribute ("collapsed", newState);    }    updateTitle();    dispatch("focus-input");}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1622/c42ddd634fe755d5b21122300c099405ed7a30d6/commands.js/clean/xul/content/commands.js