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

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

@ -22,17 +22,41 @@
--> -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [ <!DOCTYPE page [
<!ENTITY % prefAdvancedDTD SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd"> %prefAdvancedDTD; <!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" <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;"> headertitle="&lHeader;">
<spacer flex="1"/> <script type="application/x-javascript">
<description>All your favorite prefs will be making a comeback in the near future.</description> <![CDATA[
<spacer flex="1"/> 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> </page>

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

@ -53,18 +53,13 @@ function changeDisabledState(state){
document.getElementById("allowHideStatusBar").disabled = state; document.getElementById("allowHideStatusBar").disabled = state;
} }
function javascriptEnabledChange(){ function javascriptEnabledChange(aEnable){
// if javascriptAllowMailNews is overlayed (mailnews is installed), then if javascriptAllowMailnews var label = document.getElementById("allowScripts");
// and javascriptAllowNavigator are unchecked, we disable the tree items. var listbox = document.getElementById("AllowList");
// If javascriptAllowMailNews is not available, we only take javascriptAllowNavigator in consideration label.disabled = aEnable;
if (document.getElementById('javascriptAllowMailNews')){ //XXXBlake this should work...
if (!document.getElementById('javascriptAllowNavigator').checked && !document.getElementById('javascriptAllowMailNews').checked) listbox.disabled = aEnable;
changeDisabledState(true);
else changeDisabledState(false);
} else {
changeDisabledState(!document.getElementById('javascriptAllowNavigator').checked);
}
} }
function getPrefValueForCheckbox(prefName){ function getPrefValueForCheckbox(prefName){
@ -83,7 +78,7 @@ function getPrefValueForCheckbox(prefName){
function Startup(){ 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 does not exist, then it is the first time the panel was shown and we default to false
if (!("scriptData" in data)){ if (!("scriptData" in data)){
@ -110,15 +105,9 @@ function Startup(){
document.getElementById("allowDocumentCookieGet").checked = getPrefValueForCheckbox("dom.disable_cookie_get"); document.getElementById("allowDocumentCookieGet").checked = getPrefValueForCheckbox("dom.disable_cookie_get");
document.getElementById("allowDocumentCookieSet").checked = getPrefValueForCheckbox("dom.disable_cookie_set"); document.getElementById("allowDocumentCookieSet").checked = getPrefValueForCheckbox("dom.disable_cookie_set");
document.getElementById("allowHideStatusBar").checked = getPrefValueForCheckbox("dom.disable_window_open_feature.status"); 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); document.getElementById("AllowList").addEventListener("CheckboxStateChange", onCheckboxCheck, false);
@ -141,7 +130,7 @@ function doOnOk(){
return data[name].checked; 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){ if (data.scriptData["allowWindowOpenChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load", parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load",

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

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

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

@ -67,10 +67,22 @@
<treecell url="chrome://browser/content/pref/pref-connection.xul" label="&connection.label;" /> <treecell url="chrome://browser/content/pref/pref-connection.xul" label="&connection.label;" />
</treerow> </treerow>
</treeitem> </treeitem>
<treeitem> <treeitem container="true" id="advancedItem">
<treerow> <treerow>
<treecell url="chrome://browser/content/pref/pref-advanced.xul" label="&advance.label;"/> <treecell url="chrome://browser/content/pref/pref-advanced.xul" label="&advance.label;"/>
</treerow> </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> </treeitem>
</treechildren> </treechildren>
</tree> </tree>

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

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

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

@ -9,3 +9,5 @@
<!ENTITY privacy.label "Privacy"> <!ENTITY privacy.label "Privacy">
<!ENTITY advance.label "Advanced"> <!ENTITY advance.label "Advanced">
<!ENTITY connection.label "Connection"> <!ENTITY connection.label "Connection">
<!ENTITY scriptsAndWindows.label "Scripts &amp; Windows">
<!ENTITY cache.label "Cache">