зеркало из https://github.com/mozilla/pjs.git
bug 177572: unchecking "enable images" in prefs does not disable images
bug 194865: checkbox "for the originating Web site only" can't be checked I removed the broadcaster, btw, since it was observed by only one element.
This commit is contained in:
Родитель
af90b5e2ca
Коммит
fafb36d163
|
@ -34,24 +34,45 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
var _elementIDs = ["advancedJavaAllow", "enableJavaScript", "enableImages", "enableImagesForOriginatingSiteOnly",
|
||||
var _elementIDs = ["advancedJavaAllow", "enableJavaScript", "enableImagePref",
|
||||
"popupPolicy", "allowWindowMoveResize", "allowWindowFlip", "allowHideStatusBar",
|
||||
"allowWindowStatusChange", "allowImageSrcChange"];
|
||||
|
||||
|
||||
var gImagesPref, gImagesEnabled, gImagesRestricted;
|
||||
var policyButton = null;
|
||||
var manageTree = null;
|
||||
|
||||
function Startup()
|
||||
{
|
||||
policyButton = document.getElementById("popupPolicy");
|
||||
manageTree = document.getElementById("permissionsTree");
|
||||
togglePermissionEnabling();
|
||||
loadPermissions();
|
||||
|
||||
var imagesEnabled = document.getElementById("enableImages").checked;
|
||||
var imageBroadcaster = document.getElementById("imageBroadcaster");
|
||||
imageBroadcaster.setAttribute("disabled", !imagesEnabled);
|
||||
javascriptEnabledChange()
|
||||
|
||||
gImagesPref = document.getElementById("enableImagePref");
|
||||
gImagesEnabled = document.getElementById("enableImages");
|
||||
gImagesRestricted = document.getElementById("enableRestricted");
|
||||
var prefValue = gImagesPref.getAttribute("value");
|
||||
if (!prefValue)
|
||||
prefValue = "0";
|
||||
switch (prefValue) {
|
||||
case "1": gImagesRestricted.checked=true;
|
||||
case "0": gImagesEnabled.checked=true;
|
||||
}
|
||||
if (!gImagesEnabled.checked)
|
||||
gImagesRestricted.disabled=true;
|
||||
}
|
||||
|
||||
function updateImagePref()
|
||||
{
|
||||
if (!gImagesEnabled.checked) {
|
||||
gImagesPref.setAttribute("value", 2)
|
||||
gImagesRestricted.disabled=true;
|
||||
} else {
|
||||
gImagesPref.setAttribute("value", gImagesRestricted.checked?1:0)
|
||||
gImagesRestricted.disabled=false;
|
||||
}
|
||||
}
|
||||
|
||||
function viewImages()
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
|
||||
<stringbundle id="stringBundle" src="chrome://browser/locale/pref/addPopup.properties"/>
|
||||
|
||||
<broadcaster id="imageBroadcaster"/>
|
||||
|
||||
<groupbox flex="1">
|
||||
<checkbox label="&popupReject.label;"
|
||||
prefstring="dom.disable_open_during_load"
|
||||
|
@ -102,18 +100,20 @@
|
|||
oncommand="advancedJavaScript();" class="uniWidthButton"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<hbox>
|
||||
<vbox flex="1">
|
||||
<checkbox id="enableImages"
|
||||
oncommand="document.getElementById('imageBroadcaster').setAttribute('disabled', this.checked ? 'false' : 'true');"
|
||||
label="&enableImages.label;" accesskey="&enableImages.accesskey;"
|
||||
prefstring="network.image.enable"/>
|
||||
<checkbox id="enableImagesForOriginatingSiteOnly" observes="imageBroadcaster"
|
||||
oncommand="updateImagePref()"
|
||||
label="&enableImages.label;"
|
||||
accesskey="&enableImages.accesskey;"/>
|
||||
<checkbox id="enableRestricted"
|
||||
label="&forOriginatingSiteOnly.label;"
|
||||
accesskey="&forOriginatingSiteOnly.accesskey;"
|
||||
prefstring="network.image.enableForOriginatingWebsiteOnly"
|
||||
oncommand="updateImagePref()"
|
||||
style="margin-left: 23px;"/>
|
||||
<data id="enableImagePref" preftype="int" prefstring="network.image.imageBehavior" prefattribute="value" wsm_attributes="value"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<button id="manageImages" class="uniWidthButton"
|
||||
|
|
Загрузка…
Ссылка в новой задаче