From 4cbcf9824ae45f75302a9f46211ae3b679f2e013 Mon Sep 17 00:00:00 2001 From: "bugzilla%arlen.demon.co.uk" Date: Thu, 10 Feb 2005 00:45:39 +0000 Subject: [PATCH] Bug 239557 Cleanup of new Cookie UI for 1.8a/b p=me/mvl r=mvl a=asa --- .../cookie/resources/content/pref-cookies.xul | 23 +++++++++++-------- .../resources/locale/en-US/pref-cookies.dtd | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/extensions/cookie/resources/content/pref-cookies.xul b/extensions/cookie/resources/content/pref-cookies.xul index 295a251c1a9..481cea098d6 100644 --- a/extensions/cookie/resources/content/pref-cookies.xul +++ b/extensions/cookie/resources/content/pref-cookies.xul @@ -89,15 +89,15 @@ var cookieLifetime = document.getElementById("networkCookieLifetime"); var lifetimeDays = document.getElementById("lifetimeDays"); var alwaysAcceptSession = document.getElementById("alwaysAcceptSession"); - if (cookieLifetime.value == ask_before_accepting) { - lifetimeDays.disabled = true; - alwaysAcceptSession.disabled = false; - } else if (cookieLifetime.value == accept_for_n_days) { - lifetimeDays.disabled = false; - alwaysAcceptSession.disabled = true; - } else { + + if (cookieBehavior.value == cookies_disabled) { + cookieLifetime.disabled = true; lifetimeDays.disabled = true; alwaysAcceptSession.disabled = true; + } else { + cookieLifetime.disabled = false + lifetimeDays.disabled = (cookieLifetime.value != accept_for_n_days); + alwaysAcceptSession.disabled = (cookieLifetime.value != ask_before_accepting); } if (parent.hPrefWindow.getPrefIsLocked(alwaysAcceptSession.getAttribute("prefstring")) ) @@ -105,7 +105,10 @@ if (parent.hPrefWindow.getPrefIsLocked(lifetimeDays.getAttribute("prefstring")) ) lifetimeDays.disabled = true; - + + if (parent.hPrefWindow.getPrefIsLocked(cookieLifetime.getAttribute("prefstring")) ) + cookieLifetime.disabled = true; + if (!lifetimeDays.disabled && setFocus) lifetimeDays.focus(); } @@ -132,7 +135,7 @@ - + @@ -142,7 +145,7 @@ oncommand="setDisables(true);"/> -