support refreshing the tree after edits have been made, restoring original selection

This commit is contained in:
alecf%netscape.com 2000-05-17 00:27:59 +00:00
Родитель 215c89dbb5
Коммит 094f68c0a0
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -132,7 +132,21 @@ function refreshFilterList() {
var tree = document.getElementById("filterTree");
if (!tree) return;
var selection;
var selectedItems = tree.selectedItems;
if (selectedItems && selectedItems.length >0)
selection = tree.selectedItems[0].id;
tree.clearItemSelection();
tree.clearCellSelection();
tree.setAttribute("ref", tree.getAttribute("ref"));
if (selection) {
var newItem = document.getElementById(selection);
tree.selectItem(newItem);
tree.ensureElementIsVisible(newItem);
}
}
function updateButtons()