bug 92386, remove-all-sites button is active when it shouldn't be, r=vishy, sr=blake

This commit is contained in:
morse%netscape.com 2001-08-01 02:45:30 +00:00
parent 4dada4ca51
commit 91fadc2512
2 changed files with 13 additions and 8 deletions

View File

@ -369,18 +369,19 @@ function loadPermissions()
contentStr = bundle.GetStringFromName(capability ? "can" : "cannot");
AddPermissionToList(cookie_permissions_count, host, type, capability);
AddItem("cookiePermList", [host, contentStr], "cookiepermtree_", cookie_permissions_count++);
if (cookie_permissions_count == 0) {
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
}
} else if (type == imageType) {
contentStr = bundle.GetStringFromName(capability ? "canImages" : "cannotImages");
AddPermissionToList(image_permissions_count, host, type, capability);
AddItem("imagePermList", [host, contentStr], "imagepermtree_", image_permissions_count++);
if (image_permissions_count == 0) {
document.getElementById("removeAllImages").setAttribute("disabled","true");
}
}
}
if (cookie_permissions_count == 0) {
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
}
if (image_permissions_count == 0) {
document.getElementById("removeAllImages").setAttribute("disabled","true");
}
}
function ViewCookiePermissionSelected()

View File

@ -302,7 +302,9 @@ function LoadNopreview()
currSignon = RemoveHTMLFormatting(currSignon);
AddItem("nopreviewlist",[currSignon],"nopreview_",i-1);
}
nopreviews_count = nopreviewList.length-1;
if (nopreviewList) {
nopreviews_count = nopreviewList.length-1; // -1 because first item is always blank
}
if (nopreviews_count == 0) {
document.getElementById("removeAllNopreviews").setAttribute("disabled","true");
}
@ -355,7 +357,9 @@ function LoadNocapture()
currSignon = RemoveHTMLFormatting(currSignon);
AddItem("nocapturelist",[currSignon],"nocapture_",i-1);
}
nocaptures_count = nocaptureList.length-1;
if (nocaptureList) {
nocaptures_count = nocaptureList.length-1; // -1 because first item is always blank
}
if (nocaptures_count == 0) {
document.getElementById("removeAllNocaptures").setAttribute("disabled","true");
}