rem: popupChild = document.createElement("menuitem"); popupChild.setAttribute("type", "checkbox"); popupChild.setAttribute("value", columnName); if (columnName == "") { var display = currTreeCol.getAttribute("display"); popupChild.setAttribute("value", display); 
add: if (currTreeCol.getAttribute("collapsed") != "true") { popupChild = document.createElement("menuitem"); popupChild.setAttribute("type", "checkbox"); popupChild.setAttribute("value", columnName); if (columnName == "") { var display = currTreeCol.getAttribute("display"); popupChild.setAttribute("value", display); } popupChild.setAttribute("colid", currColNode.id); popupChild.setAttribute("oncommand", "ToggleColumnState(this, document)"); if ("true" != currColNode.getAttribute("hidden")) { popupChild.setAttribute("checked", "true"); } popup.appendChild(popupChild); 
context: function BuildTreePopup( treeColGroup, treeHeadRow, popup, skipCell ){  var popupChild = popup.firstChild;  var firstTime = !popupChild ? true : false;  var currTreeCol = treeHeadRow.firstChild;  var currColNode = treeColGroup.firstChild;  while (currTreeCol) {    if (currColNode.tagName == "splitter")      currColNode = currColNode.nextSibling;    if (skipCell != currTreeCol) {      // Construct an entry for each cell in the row.      var columnName = currTreeCol.getAttribute("value");      if (firstTime) {        popupChild = document.createElement("menuitem");        popupChild.setAttribute("type", "checkbox");        popupChild.setAttribute("value", columnName);        if (columnName == "") {          var display = currTreeCol.getAttribute("display");          popupChild.setAttribute("value", display);        }        popupChild.setAttribute("colid", currColNode.id);        popupChild.setAttribute("oncommand", "ToggleColumnState(this, document)");        if ("true" != currColNode.getAttribute("hidden")) {          popupChild.setAttribute("checked", "true");        }        popup.appendChild(popupChild);      } else {        if ("true" == currColNode.getAttribute("hidden")) {          if (popupChild.getAttribute("checked"))            popupChild.removeAttribute("checked");        } else {          if (!popupChild.getAttribute("checked"))            popupChild.setAttribute("checked", "true");        }        popupChild = popupChild.nextSibling;      }    }    currTreeCol = currTreeCol.nextSibling;    currColNode = currColNode.nextSibling;  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/d4c8771cfea634f1a7f3846c110ea68465a388ad/treePopups.js/clean/xpfe/global/resources/content/treePopups.js