Cookie Manager: "remove cookie" and "remove site" should disable with un-selection

bug 202324, patch by mconnor@myrealbox.com, r=mvl, sr=alecf
This commit is contained in:
mvl%exedo.nl 2004-01-31 18:35:06 +00:00
parent 90503e21f4
commit 70f275f05b
2 changed files with 10 additions and 6 deletions

View File

@ -309,6 +309,7 @@ function CookieSelected() {
if (selections.length) {
document.getElementById("removeCookie").removeAttribute("disabled");
} else {
document.getElementById("removeCookie").setAttribute("disabled", "true");
ClearCookieProperties();
return true;
}
@ -503,7 +504,7 @@ function loadPermissions() {
// disable "remove all" button if there are no cookies/images
if (permissions.length == 0) {
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
document.getElementById("removeAllPermissions").setAttribute("disabled", "true");
} else {
document.getElementById("removeAllPermissions").removeAttribute("disabled");
}
@ -512,9 +513,10 @@ function loadPermissions() {
function PermissionSelected() {
var selections = GetTreeSelections(permissionsTree);
if (selections.length) {
if (selections.length)
document.getElementById("removePermission").removeAttribute("disabled");
}
else
document.getElementById("removePermission").setAttribute("disabled", "true");
}
function DeletePermission() {

View File

@ -309,6 +309,7 @@ function CookieSelected() {
if (selections.length) {
document.getElementById("removeCookie").removeAttribute("disabled");
} else {
document.getElementById("removeCookie").setAttribute("disabled", "true");
ClearCookieProperties();
return true;
}
@ -503,7 +504,7 @@ function loadPermissions() {
// disable "remove all" button if there are no cookies/images
if (permissions.length == 0) {
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
document.getElementById("removeAllPermissions").setAttribute("disabled", "true");
} else {
document.getElementById("removeAllPermissions").removeAttribute("disabled");
}
@ -512,9 +513,10 @@ function loadPermissions() {
function PermissionSelected() {
var selections = GetTreeSelections(permissionsTree);
if (selections.length) {
if (selections.length)
document.getElementById("removePermission").removeAttribute("disabled");
}
else
document.getElementById("removePermission").setAttribute("disabled", "true");
}
function DeletePermission() {