From 70f275f05b862cd599277bfc8bf07fb1f31cfddd Mon Sep 17 00:00:00 2001 From: "mvl%exedo.nl" Date: Sat, 31 Jan 2004 18:35:06 +0000 Subject: [PATCH] Cookie Manager: "remove cookie" and "remove site" should disable with un-selection bug 202324, patch by mconnor@myrealbox.com, r=mvl, sr=alecf --- .../wallet/cookieviewer/resources/content/CookieViewer.js | 8 +++++--- xpfe/components/permissions/content/cookieViewer.js | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/wallet/cookieviewer/resources/content/CookieViewer.js b/extensions/wallet/cookieviewer/resources/content/CookieViewer.js index c2f572cd4fc3..d4645b777688 100644 --- a/extensions/wallet/cookieviewer/resources/content/CookieViewer.js +++ b/extensions/wallet/cookieviewer/resources/content/CookieViewer.js @@ -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() { diff --git a/xpfe/components/permissions/content/cookieViewer.js b/xpfe/components/permissions/content/cookieViewer.js index c2f572cd4fc3..d4645b777688 100644 --- a/xpfe/components/permissions/content/cookieViewer.js +++ b/xpfe/components/permissions/content/cookieViewer.js @@ -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() {