mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
bug 92386, remove-all-sites button is active when it shouldn't be, r=vishy, sr=blake
This commit is contained in:
parent
4dada4ca51
commit
91fadc2512
@ -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()
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user