rem: if (fill_after.nextSibling == fill_before) { var name_template = get_localized_string("SortMenuItem"); var tree_column = head.firstChild; var column_node = columns.firstChild; while (tree_column) { if (skip_column != tree_column) { 
add: var name_template = get_localized_string("SortMenuItem"); var tree_column = head.firstChild; var column_node = columns.firstChild; var popupChild = popup.firstChild.nextSibling.nextSibling; var firstTime = (fill_after.nextSibling == fill_before); while (tree_column) { if (firstTime) { if (skip_column != tree_column && tree_column.getAttribute("collapsed") != "true") { 
context: function fillViewMenu(popup){  var fill_after = document.getElementById('fill_after_this_node');  var fill_before = document.getElementById('fill_before_this_node');  var columns = document.getElementById('theColumns');  var head = document.getElementById('headRow');  var skip_column = document.getElementById('popupCell');        if (fill_after.nextSibling == fill_before) {      var name_template = get_localized_string("SortMenuItem");      var tree_column = head.firstChild;      var column_node = columns.firstChild;      while (tree_column) {          if (skip_column != tree_column) {              // Construct an entry for each cell in the row.              var column_name = tree_column.getAttribute("value");              var item = document.createElement("menuitem");              item.setAttribute("type", "radio");              item.setAttribute("name", "sort_column");              if (column_name == "") {                  column_name = tree_column.getAttribute("display");              }              var name = name_template.replace(/%NAME%/g, column_name);              var id = column_node.id;              item.setAttribute("value", name);              item.setAttribute("oncommand", "SetSortColumn('"+id+"', true);");              item.setAttribute("column_id", id);                            popup.insertBefore(item, fill_before);          }          tree_column = tree_column.nextSibling;          column_node = column_node.nextSibling;          if (column_node && column_node.tagName == "splitter")              column_node = column_node.nextSibling;      }  }  var sort_column = find_sort_column();  var sort_direction = find_sort_direction(sort_column);  update_sort_menuitems(sort_column, sort_direction);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/47e9522ee3c2969bdb511401570312e721de8fbe/nsTreeUtils.js/buggy/xpfe/global/resources/content/nsTreeUtils.js