home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 December
/
PCWorld_2005-12_cd.bin
/
komunikace
/
netscape
/
nsb-install-8-0.exe
/
chrome
/
comm.jar
/
content
/
cookie
/
pref-cookies.xul
< prev
next >
Wrap
Extensible Markup Language
|
2005-09-26
|
6KB
|
149 lines
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
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 Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
-->
<?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>