This commit is contained in:
blakeross%telocity.com 2002-09-25 00:29:20 +00:00
Родитель c21bf0989b
Коммит 7a81ebf5ca
6 изменённых файлов: 67 добавлений и 45 удалений

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

@ -22,17 +22,41 @@
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % prefAdvancedDTD SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd"> %prefAdvancedDTD;
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd">
%brandDTD;
<!ENTITY % prefAdvancedDTD SYSTEM "chrome://browser/locale/pref/pref-advanced.dtd"> %prefAdvancedDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-advanced.xul');"
onload="parent.initPanel('chrome://browser/content/pref/pref-advanced.xul');"
headertitle="&lHeader;">
<spacer flex="1"/>
<description>All your favorite prefs will be making a comeback in the near future.</description>
<spacer flex="1"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["advancedJavaAllow"];
function Startup() {
ftpCheck();
}
function ftpCheck() {
var checked = document.getElementById("advancedMailFTP").checked;
var field = document.getElementById("advancedMailFTPAddress");
field.disabled = !checked;
if (checked)
field.focus();
}
]]>
</script>
<groupbox id="advancedSettings" align="start">
<caption label="&advancedTitle.label;"/>
<vbox align="start" id="contentEnablingBox">
<checkbox id="advancedJavaAllow" label="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
prefstring="security.enable_java"/>
</vbox>
</groupbox>
</page>

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

@ -53,18 +53,13 @@ function changeDisabledState(state){
document.getElementById("allowHideStatusBar").disabled = state;
}
function javascriptEnabledChange(){
// if javascriptAllowMailNews is overlayed (mailnews is installed), then if javascriptAllowMailnews
// and javascriptAllowNavigator are unchecked, we disable the tree items.
// If javascriptAllowMailNews is not available, we only take javascriptAllowNavigator in consideration
if (document.getElementById('javascriptAllowMailNews')){
if (!document.getElementById('javascriptAllowNavigator').checked && !document.getElementById('javascriptAllowMailNews').checked)
changeDisabledState(true);
else changeDisabledState(false);
} else {
changeDisabledState(!document.getElementById('javascriptAllowNavigator').checked);
}
function javascriptEnabledChange(aEnable){
var label = document.getElementById("allowScripts");
var listbox = document.getElementById("AllowList");
label.disabled = aEnable;
//XXXBlake this should work...
listbox.disabled = aEnable;
}
function getPrefValueForCheckbox(prefName){
@ -83,7 +78,7 @@ function getPrefValueForCheckbox(prefName){
function Startup(){
data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-scripts.xul"];
data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-scripts.xul"];
//If scriptData does not exist, then it is the first time the panel was shown and we default to false
if (!("scriptData" in data)){
@ -110,15 +105,9 @@ function Startup(){
document.getElementById("allowDocumentCookieGet").checked = getPrefValueForCheckbox("dom.disable_cookie_get");
document.getElementById("allowDocumentCookieSet").checked = getPrefValueForCheckbox("dom.disable_cookie_set");
document.getElementById("allowHideStatusBar").checked = getPrefValueForCheckbox("dom.disable_window_open_feature.status");
//If we don't have a checkbox under groupbox pluginPreferences, we should hide it
var pluginGroup = document.getElementById("pluginPreferences")
var children = pluginGroup.childNodes;
if (!children || children.length <= 1) // 1 for the caption
pluginGroup.setAttribute("hidden", "true");
}
javascriptEnabledChange();
javascriptEnabledChange(!document.getElementById("enableJavascript").checked);
document.getElementById("AllowList").addEventListener("CheckboxStateChange", onCheckboxCheck, false);
@ -141,7 +130,7 @@ function doOnOk(){
return data[name].checked;
}
var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-scripts.xul"];
var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-scripts.xul"];
if (data.scriptData["allowWindowOpenChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load",

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

@ -45,7 +45,7 @@
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://browser/content/pref/pref-scripts.xul";
var _elementIDs = ["javascriptAllowNavigator",
var _elementIDs = ["enableJavascript",
"allowWindowOpen",
"allowWindowMoveResize",
"allowWindowFlip",
@ -57,15 +57,15 @@
]]>
</script>
<groupbox id="javascriptPreferences" flex="1">
<caption label="&enableJavaScript.label;"/>
<checkbox id="javascriptAllowNavigator" label="&navigator.label;" accesskey="&navigator.accesskey;"
<groupbox flex="1">
<caption>
<hbox>
<checkbox id="enableJavascript" label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;"
prefstring="javascript.enabled"
oncommand="javascriptEnabledChange();"/>
oncommand="javascriptEnabledChange(!this.checked);"/>
</hbox>
</caption>
<separator/>
<label id="allowScripts" value="&allowScripts.label;"/>
<listbox id="AllowList" flex="1">

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

@ -67,10 +67,22 @@
<treecell url="chrome://browser/content/pref/pref-connection.xul" label="&connection.label;" />
</treerow>
</treeitem>
<treeitem>
<treeitem container="true" id="advancedItem">
<treerow>
<treecell url="chrome://browser/content/pref/pref-advanced.xul" label="&advance.label;"/>
</treerow>
<treechildren id="advancedChildren">
<treeitem>
<treerow>
<treecell url="chrome://browser/content/pref/pref-scripts.xul" label="&scriptsAndWindows.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://browser/content/pref/pref-cache.xul" label="&cache.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
</treechildren>
</tree>

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

@ -1,13 +1,10 @@
<!-- extracted from content/pref-scripts.xul -->
<!--LOCALIZATION NOTE : FILE The 'Scripts & Plugins' preferences dialog -->
<!ENTITY lHeader "Scripts &amp; Plugins">
<!ENTITY lHeader "Scripts &amp; Windows">
<!--LOCALIZATION NOTE (enableJsCheck.label): 'JavaScript' should never be translated -->
<!ENTITY navigator.label "Navigator">
<!ENTITY navigator.accesskey "r">
<!ENTITY enableJavaScript.label "Enable JavaScript for">
<!ENTITY enableJavaScript.label "Enable JavaScript">
<!ENTITY enableJavaScript.accesskey "J">
<!ENTITY allowScripts.label "Allow scripts to:">
<!ENTITY allowWindowOpen.label "Open unrequested windows">
<!ENTITY allowWindowMoveResize.label "Move or resize existing windows">
@ -17,5 +14,3 @@
<!ENTITY allowDocumentCookieSet.label "Create or change cookies">
<!ENTITY allowDocumentCookieGet.label "Read cookies">
<!ENTITY allowHideStatusBar.label "Hide the status bar">
<!ENTITY enablePlugin.label "Enable Plugins for">

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

@ -8,4 +8,6 @@
<!--LOCALIZATION NOTE (smartBrowse.label): DONT_TRANSLATE -->
<!ENTITY privacy.label "Privacy">
<!ENTITY advance.label "Advanced">
<!ENTITY connection.label "Connection">
<!ENTITY connection.label "Connection">
<!ENTITY scriptsAndWindows.label "Scripts &amp; Windows">
<!ENTITY cache.label "Cache">