75825 - View|Show Columns menuitem is always disabled in bookmarks view menu.

Prevent the disabling code from disabling any items outside its range of intended
operation.
r=pchen, sr=hyatt
This commit is contained in:
ben%netscape.com 2001-10-20 11:11:58 +00:00
Родитель 41f3c95e4b
Коммит a794fe1b5d
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -230,6 +230,7 @@ function update_sort_menuitems(column, direction)
enable_sort_menuitems();
}
// XXX this could be a bit more elegant.
function enable_sort_menuitems() {
var columns = document.getElementById('theColumns');
var column_node = columns.firstChild;
@ -237,8 +238,8 @@ function enable_sort_menuitems() {
var tree_column = head.firstChild;
var skip_column = document.getElementById('popupCell');
var menuitem = document.getElementById('fill_after_this_node');
menuitem = menuitem.nextSibling
while (column_node && menuitem) {
menuitem = menuitem.nextSibling;
while (column_node && menuitem && menuitem.id != 'fill_before_this_node') {
if (skip_column != tree_column) {
if ("true" == column_node.getAttribute("hidden")) {
menuitem.setAttribute("disabled", "true");