зеркало из https://github.com/mozilla/pjs.git
Splitting cookies/images pref pane into two separate panes (40888). r=ben
This commit is contained in:
Родитель
e598ce76a2
Коммит
5dbe23ad86
|
@ -25,25 +25,15 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
class="color-dialog"
|
||||
align="vertical" title="&window.title;"
|
||||
onload="imageBlockingEnabled(); parent.initPanel(panel);">
|
||||
onload="parent.initPanel(panel);">
|
||||
|
||||
<script language="JavaScript">
|
||||
<![CDATA[
|
||||
var panel = "chrome://communicator/content/pref/pref-advanced.xul";
|
||||
_elementIDs = ["advancedAlwaysLoadImages", "advancedJavaAllow", "javascriptEnabled", "advancedMailFTP"];
|
||||
|
||||
function imageBlockingEnabled()
|
||||
{
|
||||
if( parent.hPrefWindow.getPref( "bool", "imageblocker.enabled" ) )
|
||||
{
|
||||
var element = document.getElementById("advancedAlwaysLoadImages");
|
||||
element.setAttribute("hidden","true");
|
||||
}
|
||||
}
|
||||
|
||||
_elementIDs = ["advancedJavaAllow", "javascriptEnabled", "advancedMailFTP"];
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
@ -53,9 +43,6 @@
|
|||
|
||||
<titledbox orient="vertical" id="advancedSettings" autostretch="never">
|
||||
<title><text value="&advancedTitle.label;"/></title>
|
||||
<checkbox id="advancedAlwaysLoadImages" value="&autoLoadImgCheck.label;" accesskey="&autoLoadImgCheck.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="advanced.always_load_images"
|
||||
prefattribute="checked"/>
|
||||
<checkbox id="advancedJavaAllow" value="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="security.enable_java"
|
||||
prefattribute="checked"/>
|
||||
|
|
|
@ -33,53 +33,26 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
class="color-dialog"
|
||||
align="vertical"
|
||||
onload="imageBlockingEnabled(); parent.initPanel('chrome://communicator/content/pref/pref-cookies.xul');">
|
||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-cookies.xul');">
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
_elementIDs = ["networkCookieBehaviour", "networkWarnAboutCookies", "networkImageBehaviour", "networkImageWarnAboutImages"];
|
||||
|
||||
// enable image blocker if "imageblocker.enabled" pref is true
|
||||
function imageBlockingEnabled()
|
||||
{
|
||||
if( parent.hPrefWindow.getPref( "bool", "imageblocker.enabled" ) )
|
||||
{
|
||||
var element = document.getElementById( "imagesArea" );
|
||||
element.removeAttribute("hidden");
|
||||
var cookieHeader = document.getElementById( "cookieHeader" );
|
||||
cookieHeader.setAttribute( "title", cookieHeader.getAttribute( "titleWithImages" ) );
|
||||
}
|
||||
}
|
||||
|
||||
function updateImageFields( aInteger, aBoolean )
|
||||
{
|
||||
var imageBehaviourField = document.getElementById("networkImageBehaviour");
|
||||
var imageBehaviourCheckbox = document.getElementById("networkImageWarnAboutImages");
|
||||
|
||||
imageBehaviourField.value = aInteger;
|
||||
imageBehaviourCheckbox.checked = aBoolean;
|
||||
}
|
||||
_elementIDs = ["networkCookieBehaviour", "networkWarnAboutCookies"];
|
||||
|
||||
function viewCookies()
|
||||
{
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","","modal=yes,chrome,resizable=no", 0);
|
||||
}
|
||||
|
||||
function viewImages()
|
||||
{
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","","modal=yes,chrome,resizable=no", 2 );
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<box class="box-smallheader" id="cookieHeader"
|
||||
title="&lHeader;" titleWithImages="&lHeaderWithImages;"/>
|
||||
<box class="box-smallheader" id="cookieHeader" title="&lHeader;"/>
|
||||
|
||||
<titledbox orient="vertical">
|
||||
<title><text value="&cookies;"/></title>
|
||||
<title><text value="&cookiePolicy.label;"/></title>
|
||||
|
||||
<html>&cookieDetails;</html>
|
||||
|
||||
|
@ -98,28 +71,4 @@
|
|||
</box>
|
||||
</titledbox>
|
||||
|
||||
<titledbox orient="vertical" id="imagesArea" hidden="true">
|
||||
<title><text value="&images;"/></title>
|
||||
|
||||
<html>&imageDetails;</html>
|
||||
|
||||
<radiogroup id="networkImageBehaviour" orient="vertical" autostretch="never"
|
||||
pref="true" preftype="int" prefstring="network.image.imageBehavior"
|
||||
prefattribute="data">
|
||||
<radio group="networkImageBehaviour" data="0" value="&accAllImagesRadio.label;" accesskey="&accAllImagesRadio.accesskey;"/>
|
||||
<radio group="networkImageBehaviour" data="1" value="&accOrgImagesRadio.label;" accesskey="&accOrgImagesRadio.accesskey;"/>
|
||||
<radio group="networkImageBehaviour" data="2" value="&disableImages.label;" accesskey="&disableImages.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<checkbox class="indent" id="networkImageWarnAboutImages" value="&warnAboutImages.label;" accesskey="&warnAboutImages.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="network.image.warnAboutImages"
|
||||
prefattribute="checked"/>
|
||||
|
||||
<box autostretch="never" halign="right">
|
||||
<button class="dialog" value="&viewImages.label;" accesskey="&viewImages.accesskey;" oncommand="viewImages();"/>
|
||||
</box>
|
||||
|
||||
</titledbox>
|
||||
|
||||
|
||||
</window>
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<?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):
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % prefImagesDTD SYSTEM "chrome://communicator/locale/pref/pref-images.dtd" >
|
||||
%prefImagesDTD;
|
||||
]>
|
||||
|
||||
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml" id="imagesWindow"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
class="color-dialog"
|
||||
align="vertical"
|
||||
onload="imageBlockingEnabled(); parent.initPanel('chrome://communicator/content/pref/pref-images.xul');">
|
||||
|
||||
<script language="JavaScript">
|
||||
<![CDATA[
|
||||
|
||||
_elementIDs = ["accOrgImages", "networkImageBehaviour", "networkImageWarnAboutImages"];
|
||||
|
||||
// Present finer control over image loading to the user.
|
||||
// enable image blocker if "imageblocker.enabled" pref is true
|
||||
function imageBlockingEnabled()
|
||||
{
|
||||
|
||||
if( !parent.hPrefWindow.getPref( "bool", "imageblocker.enabled" ) )
|
||||
{
|
||||
|
||||
// Hide originating server option.
|
||||
var orgImages = document.getElementById( "accOrgImages" );
|
||||
orgImages.setAttribute("hidden", "true");
|
||||
|
||||
// Hide warn about images button.
|
||||
var networkImageWarnAboutImages = document.getElementById( "networkImageWarnAboutImages");
|
||||
networkImageWarnAboutImages.setAttribute("hidden", "true");
|
||||
|
||||
// Hide viewImages button.
|
||||
var viewImages = document.getElementById( "viewImages");
|
||||
viewImages.setAttribute("hidden", "true");
|
||||
|
||||
} else {
|
||||
|
||||
// Show originating server option.
|
||||
var orgImages = document.getElementById( "accOrgImages" );
|
||||
orgImages.setAttribute("hidden", "false");
|
||||
|
||||
// Show warn about images button.
|
||||
var networkImageWarnAboutImages = document.getElementById( "networkImageWarnAboutImages");
|
||||
networkImageWarnAboutImages.setAttribute("hidden", "false");
|
||||
|
||||
// Show viewImages button.
|
||||
var viewImages = document.getElementById( "viewImages");
|
||||
viewImages.setAttribute("hidden", "false");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function updateImageFields( aInteger, aBoolean )
|
||||
{
|
||||
var imageBehaviourField = document.getElementById("networkImageBehaviour");
|
||||
var imageBehaviourCheckbox = document.getElementById("networkImageWarnAboutImages");
|
||||
|
||||
imageBehaviourField.value = aInteger;
|
||||
imageBehaviourCheckbox.checked = aBoolean;
|
||||
}
|
||||
|
||||
function viewImages()
|
||||
{
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","",
|
||||
"modal=yes,chrome,resizable=no", 2 );
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<box class="box-smallheader" id="imagesHeader" title="&lHeader;"/>
|
||||
|
||||
<titledbox orient="vertical" id="imagesArea">
|
||||
<title><text value="&imageBlocking.label;"/></title>
|
||||
|
||||
<html>&imageDetails;</html>
|
||||
|
||||
<radiogroup id="networkImageBehaviour" orient="vertical" autostretch="never"
|
||||
pref="true" preftype="int" prefstring="network.image.imageBehavior"
|
||||
prefattribute="data">
|
||||
<radio group="networkImageBehaviour" data="0" value="&accAllImagesRadio.label;" accesskey="&accAllImagesRadio.accesskey;"/>
|
||||
<radio id="accOrgImages" group="networkImageBehaviour" data="1" value="&accOrgImagesRadio.label;" accesskey="&accOrgImagesRadio.accesskey;"/>
|
||||
<radio group="networkImageBehaviour" data="2" value="&disableImages.label;" accesskey="&disableImages.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<checkbox class="indent" id="networkImageWarnAboutImages" value="&warnAboutImages.label;" accesskey="&warnAboutImages.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="network.image.warnAboutImages"
|
||||
prefattribute="checked"/>
|
||||
|
||||
<box autostretch="never" halign="right">
|
||||
<button class="dialog" id="viewImages" value="&viewImages.label;" accesskey="&viewImages.accesskey;" oncommand="viewImages();"/>
|
||||
</box>
|
||||
|
||||
</titledbox>
|
||||
|
||||
|
||||
</window>
|
|
@ -38,14 +38,6 @@
|
|||
// If this call worked, we could center the window here:
|
||||
// centerWindowOnScreen();
|
||||
|
||||
// modify the cookie tree entry if imageblocking is disabled.
|
||||
if( hPrefWindow.getPref( "bool", "imageblocker.enabled" ) )
|
||||
{
|
||||
dump("*** foopy = " + hPrefWindow.getPref( "bool", "imageblocker.enabled" ) + "\n");
|
||||
var element = document.getElementById( "cookiesCell" );
|
||||
element.setAttribute( "value", element.getAttribute( "valueWithImages" ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
]]>
|
||||
|
|
|
@ -129,10 +129,16 @@
|
|||
<treeitem>
|
||||
<treerow>
|
||||
<treecell class="treecell-indent" url="chrome://communicator/content/pref/pref-cookies.xul"
|
||||
value="&cookies.label;" valueWithImages="&cookies.labelWithImages;"
|
||||
value="&cookies.label;"
|
||||
id="cookiesCell"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
<treeitem>
|
||||
<treerow>
|
||||
<treecell class="treecell-indent" url="chrome://communicator/content/pref/pref-images.xul"
|
||||
value="&images.label;"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
<treeitem>
|
||||
<treerow>
|
||||
<treecell class="treecell-indent" url="chrome://communicator/content/pref/pref-wallet.xul" value="&wallet.label;"/>
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
<!ENTITY window.title "Cookies">
|
||||
<!ENTITY window.titleWithImages "Cookies/Images">
|
||||
<!ENTITY lHeader "Cookies">
|
||||
<!ENTITY lHeaderWithImages "Cookies/Images">
|
||||
|
||||
<!-- cookies -->
|
||||
|
||||
<!ENTITY cookies "Cookies">
|
||||
<!ENTITY cookiePolicy.label "Cookie acceptance policy">
|
||||
|
||||
<!ENTITY accAllCookiesRadio.label "Accept all cookies">
|
||||
<!ENTITY accAllCookiesRadio.accesskey "a">
|
||||
|
@ -25,20 +23,3 @@
|
|||
<!ENTITY viewCookies.accesskey "v">
|
||||
|
||||
|
||||
<!ENTITY images "Images">
|
||||
<!--LOCALIZATION NOTE (onStartLegend.label): Don't translate "&brandShortName;".
|
||||
Place "&brandShortName;" in the phrase where the name of the application should
|
||||
appear
|
||||
-->
|
||||
<!ENTITY imageDetails "Specify how &brandShortName; handles images on webpages">
|
||||
<!ENTITY accAllImagesRadio.label "Accept all images">
|
||||
<!ENTITY accAllImagesRadio.accesskey "i">
|
||||
<!ENTITY accOrgImagesRadio.label "Accept images that come from the originating server only">
|
||||
<!ENTITY accOrgImagesRadio.accesskey "n">
|
||||
<!ENTITY disableImages.label "Do not load any images">
|
||||
<!ENTITY disableImages.accesskey "y">
|
||||
<!ENTITY warnAboutImages.label "Alert me before downloading an image">
|
||||
<!ENTITY warnAboutImages.accesskey "e">
|
||||
<!ENTITY viewImagesExplanation.label "View list of sites about which image acceptance information is stored">
|
||||
<!ENTITY viewImages.label "View Image Permissions">
|
||||
<!ENTITY viewImages.accesskey "p">
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!ENTITY window.title "Images">
|
||||
<!ENTITY lHeader "Images">
|
||||
|
||||
<!ENTITY imageBlocking.label "Image Blocking">
|
||||
|
||||
<!--LOCALIZATION NOTE (onStartLegend.label): Don't translate "&brandShortName;".
|
||||
Place "&brandShortName;" in the phrase where the name of the application should
|
||||
appear
|
||||
-->
|
||||
<!ENTITY imageDetails "Specify how &brandShortName; handles images on webpages">
|
||||
|
||||
<!ENTITY accAllImagesRadio.label "Accept all images">
|
||||
<!ENTITY accAllImagesRadio.accesskey "i">
|
||||
<!ENTITY accOrgImagesRadio.label "Accept images that come from the originating server only">
|
||||
<!ENTITY accOrgImagesRadio.accesskey "n">
|
||||
<!ENTITY disableImages.label "Do not load any images">
|
||||
<!ENTITY disableImages.accesskey "y">
|
||||
<!ENTITY warnAboutImages.label "Alert me before downloading an image">
|
||||
<!ENTITY warnAboutImages.accesskey "e">
|
||||
<!ENTITY viewImagesExplanation.label "View list of sites about which image acceptance information is stored">
|
||||
<!ENTITY viewImages.label "View Image Permissions">
|
||||
<!ENTITY viewImages.accesskey "p">
|
|
@ -20,7 +20,7 @@
|
|||
<!ENTITY advance.label "Advanced">
|
||||
<!ENTITY down.label "Download">
|
||||
<!ENTITY cookies.label "Cookies">
|
||||
<!ENTITY cookies.labelWithImages "Cookies and Images">
|
||||
<!ENTITY images.label "Images">
|
||||
<!ENTITY wallet.label "Forms and Passwords">
|
||||
<!ENTITY cache.label "Cache">
|
||||
<!ENTITY proxies.label "Proxies">
|
||||
|
|
Загрузка…
Ссылка в новой задаче