Bug 239557 Cleanup of new Cookie UI for 1.8a

p=me/mvl r=mvl sr=neil.parkwaycc.co.uk a=asa
This commit is contained in:
bugzilla%arlen.demon.co.uk 2005-02-13 20:48:38 +00:00
Родитель ff8df487f5
Коммит 73ffe00550
2 изменённых файлов: 0 добавлений и 208 удалений

Просмотреть файл

@ -1,165 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page SYSTEM "chrome://cookie/locale/pref-cookies.dtd">
<page id="cookiesPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
headertitle="&lHeader;">
<script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://cookie/content/pref-cookies.xul";
var _elementIDs = ["networkCookieBehavior", "networkCookieLifetime",
"alwaysAcceptSession", "lifetimeDays"];
function init()
{
parent.initPanel('chrome://cookie/content/pref-cookies.xul');
setDisables(false);
const NS_COOKIECONSENT_CONTRACTID = '@mozilla.org/cookie-consent;1';
if (NS_COOKIECONSENT_CONTRACTID in Components.classes) {
var p3pRadioButton = document.getElementById("p3pRadioButton");
p3pRadioButton.removeAttribute("hidden");
}
}
const cookies_disabled = "2";
const cookies_no_third_party = "1";
const cookies_p3p = "3";
const cookies_enabled = "0";
const accept_normally = "0";
const accept_session = "2";
const accept_for_n_days = "3";
const ask_before_accepting = "1";
function setDisables(setFocus)
{
var cookieBehavior = document.getElementById("networkCookieBehavior");
var p3pButton = document.getElementById("p3pDialog");
p3pButton.disabled = (cookieBehavior.value != cookies_p3p);
if (parent.hPrefWindow.getPrefIsLocked(p3pButton.getAttribute("prefstring")) )
p3pButton.disabled = true;
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 {
lifetimeDays.disabled = true;
alwaysAcceptSession.disabled = true;
}
if (parent.hPrefWindow.getPrefIsLocked(alwaysAcceptSession.getAttribute("prefstring")) )
alwaysAcceptSession.disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(lifetimeDays.getAttribute("prefstring")) )
lifetimeDays.disabled = true;
if (!lifetimeDays.disabled && setFocus)
lifetimeDays.focus();
}
]]>
</script>
<groupbox id="networkCookieAcceptPolicy">
<caption label="&cookiePolicy.label;"/>
<radiogroup id="networkCookieBehavior"
prefstring="network.cookie.cookieBehavior">
<radio value="2" label="&disableCookies.label;"
accesskey="&disableCookies.accesskey;" oncommand="setDisables(false);"/>
<radio value="1" label="&accOrgCookiesRadio.label;"
accesskey="&accOrgCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<hbox id="p3pRadioButton" hidden="true">
<radio value="3" label="&accP3PCookiesRadio.label;"
accesskey="&accP3PCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<button label="&viewP3P.label;" accesskey="&viewP3P.accesskey;" oncommand="viewP3P();"
id="p3pDialog"
prefstring="pref.advanced.cookies.disable_button.more_info"/>
</hbox>
<radio value="0" label="&accAllCookiesRadio.label;"
accesskey="&accAllCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
</radiogroup>
</groupbox>
<groupbox id="networkCookieLifetimePolicy">
<caption label="&cookieLifetimePolicy.label;"/>
<radiogroup id="networkCookieLifetime"
prefstring="network.cookie.lifetimePolicy">
<radio value="0" label="&acceptNormally.label;" accesskey="&acceptNormally.accesskey;" oncommand="setDisables(false);"/>
<radio value="2" label="&acceptForSession.label;" accesskey="&acceptForSession.accesskey;" oncommand="setDisables(false);"/>
<hbox align="center">
<radio value="3" accesskey="&acceptforNDays.accesskey;" label="&acceptforNDays.label;"
oncommand="setDisables(true);"/>
<textbox id="lifetimeDays" pref="true" size="4"
preftype="int" prefstring="network.cookie.lifetime.days"/>
<label value="&days.label;" for="lifetimeDays"/>
</hbox>
<hbox>
<radio value="1" label="&warnAboutCookies.label;"
accesskey="&warnAboutCookies.accesskey;" oncommand="setDisables(false);"/>
<checkbox id="alwaysAcceptSession" label="&forCurrentSession.label;"
accesskey="&forCurrentSession.accesskey;"
prefstring="network.cookie.alwaysAcceptSessionCookies"/>
</hbox>
</radiogroup>
</groupbox>
<groupbox id="manageCookiesAndSites">
<caption label="&manageCookies.label;"/>
<description>&manageCookiesDescription.label;</description>
<hbox pack="end">
<button label="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"
id="viewCookieButton"
prefstring="pref.advanced.cookies.disable_button.view_cookies"/>
</hbox>
</groupbox>
</page>

Просмотреть файл

@ -1,43 +0,0 @@
<!ENTITY lHeader "Cookies">
<!-- cookies -->
<!ENTITY cookiePolicy.label "Cookie Acceptance Policy">
<!ENTITY accAllCookiesRadio.label "Allow all cookies">
<!ENTITY accAllCookiesRadio.accesskey "c">
<!ENTITY accOrgCookiesRadio.label "Allow cookies for the originating website only">
<!ENTITY accOrgCookiesRadio.accesskey "o">
<!ENTITY accP3PCookiesRadio.label "Allow cookies based on privacy settings">
<!ENTITY accP3PCookiesRadio.accesskey "p">
<!ENTITY disableCookies.label "Block cookies">
<!ENTITY disableCookies.accesskey "B">
<!ENTITY cookieLifetimePolicy.label "Cookie Lifetime Policy">
<!ENTITY acceptNormally.label "Accept cookies normally">
<!ENTITY acceptNormally.accesskey "n">
<!ENTITY acceptForSession.label "Accept for current session only">
<!ENTITY acceptForSession.accesskey "s">
<!ENTITY acceptforNDays.label "Accept cookies for">
<!ENTITY acceptforNDays.accesskey "f">
<!ENTITY days.label "days">
<!ENTITY warnAboutCookies.label "Ask for each cookie">
<!ENTITY warnAboutCookies.accesskey "A">
<!ENTITY forCurrentSession.label "except for session cookies">
<!ENTITY forCurrentSession.accesskey "e">
<!ENTITY manageCookies.label "Manage Cookies and Sites">
<!ENTITY manageCookiesDescription.label "Allows you to view and manage stored cookies and per-site settings for accepting and rejecting cookies. Per-site settings will override the settings above.">
<!ENTITY viewCookies.label "Cookie Manager">
<!ENTITY viewCookies.accesskey "M">
<!ENTITY viewP3P.label "View">
<!ENTITY viewP3P.accesskey "V">