rem:  var compareFunc; if (ascending) { compareFunc = function compare(first, second) { return CompareLowerCase(first[column], second[column]); } } else { compareFunc = function compare(first, second) { return CompareLowerCase(second[column], first[column]); } 
add:  var compareFunc = function compare(first, second) { return first[column].toLowerCase().localeCompare(second[column].toLowerCase()); 
context: function SortTree(tree, view, table, column, lastSortColumn, lastSortAscending, updateSelection) {  // remember which item was selected so we can restore it after the sort  var selections = GetTreeSelections(tree);  var selectedNumber = selections.length ? table[selections[0]].number : -1;  // determine if sort is to be ascending or descending  var ascending = (column == lastSortColumn) ? !lastSortAscending : true;  // do the sort  var compareFunc;  if (ascending) {    compareFunc = function compare(first, second) {      return CompareLowerCase(first[column], second[column]);    }  } else {    compareFunc = function compare(first, second) {      return CompareLowerCase(second[column], first[column]);    }  }  table.sort(compareFunc);  // restore the selection  var selectedRow = -1;  if (selectedNumber>=0 && updateSelection) {    for (var s=0; s<table.length; s++) {      if (table[s].number == selectedNumber) {        // update selection        // note: we need to deselect before reselecting in order to trigger ...Selected()        tree.treeBoxObject.view.selection.select(-1);        tree.treeBoxObject.view.selection.select(s);        selectedRow = s;        break;      }    }  }  // display the results  tree.treeBoxObject.invalidate();  if (selectedRow >= 0) {    tree.treeBoxObject.ensureRowIsVisible(selectedRow)  }  return ascending;}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/dfcc4259904400605f28c34b14e4bd89d05e0e38/treeUtils.js/clean/browser/components/cookieviewer/content/treeUtils.js