зеркало из https://github.com/mozilla/pjs.git
Fix for bug 147877. Add UI for disabling plugins in mailnews. R=bhuvan, SR=bienvenu
This commit is contained in:
Родитель
919343d5ad
Коммит
216dddb886
|
@ -16,6 +16,7 @@
|
|||
{
|
||||
case "chrome://communicator/content/pref/pref-scripts.xul":
|
||||
_elementIDs.push("javascriptAllowMailNews");
|
||||
_elementIDs.push("pluginAllowMailNews");
|
||||
break;
|
||||
case "chrome://communicator/content/pref/pref-appearance.xul":
|
||||
_elementIDs.push("generalStartupMail");
|
||||
|
@ -32,12 +33,20 @@
|
|||
</script>
|
||||
|
||||
<!-- javascript toggle for mail/news -->
|
||||
<page id="scriptsAndWindowPanel">
|
||||
<groupbox id="javascriptPreferences">
|
||||
<checkbox id="javascriptAllowMailNews"
|
||||
label="&enbJsCheckMailNews.label;" accesskey="&enbJsCheckMailNews.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="javascript.allow.mailnews"
|
||||
prefattribute="checked" oncommand="javascriptEnabledChange();" insertafter="javascriptAllowNavigator"/>
|
||||
</page>
|
||||
</groupbox>
|
||||
<!-- plugin toggle for mail/news -->
|
||||
<groupbox id="pluginPreferences">
|
||||
<checkbox id="pluginAllowMailNews"
|
||||
label="&enbPluginCheckMailNews.label;" accesskey="&enbPluginCheckMailNews.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="mailnews.message_display.allow.plugins"
|
||||
prefattribute="checked"/>
|
||||
</groupbox>
|
||||
|
||||
<!-- mail startup toggle -->
|
||||
<groupbox id="generalStartupPreferences">
|
||||
<checkbox id="generalStartupMail" wsm_persist="true" position="3"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
<!ENTITY enbJsCheckMailNews.label "Mail & Newsgroups">
|
||||
<!ENTITY enbJsCheckMailNews.accesskey "m">
|
||||
<!ENTITY enbPluginCheckMailNews.label "Mail & Newsgroups">
|
||||
<!ENTITY enbPluginCheckMailNews.accesskey "p">
|
||||
|
||||
<!ENTITY disableCookieForMailNews.label "Disable cookies in Mail & Newsgroups">
|
||||
<!ENTITY disableCookieForMailNews.accesskey "m">
|
||||
|
|
|
@ -106,6 +106,12 @@ function Startup(){
|
|||
document.getElementById("allowDocumentCookieGet").checked = getPrefValueForCheckbox("dom.disable_cookie_get");
|
||||
document.getElementById("allowDocumentCookieSet").checked = getPrefValueForCheckbox("dom.disable_cookie_set");
|
||||
|
||||
//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");
|
||||
|
||||
} else { //not first time it was loaded, get default values from data
|
||||
|
||||
document.getElementById("allowWindowOpen").checked = data["allowWindowOpen"].checked;
|
||||
|
|
|
@ -56,24 +56,39 @@
|
|||
]]>
|
||||
</script>
|
||||
|
||||
<label value="&enableJavaScript.label;"/>
|
||||
<groupbox id="javascriptPreferences" flex="1">
|
||||
<caption label="&enableJavaScript.label;"/>
|
||||
|
||||
<checkbox id="javascriptAllowNavigator" label="&navigator.label;" accesskey="&navigator.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="javascript.enabled"
|
||||
prefattribute="checked" oncommand="javascriptEnabledChange();"/>
|
||||
<checkbox id="javascriptAllowNavigator" label="&navigator.label;" accesskey="&navigator.accesskey;"
|
||||
pref="true" preftype="bool" prefstring="javascript.enabled"
|
||||
prefattribute="checked" oncommand="javascriptEnabledChange();"/>
|
||||
|
||||
<separator/>
|
||||
<separator/>
|
||||
|
||||
<label id="allowScripts" value="&allowScripts.label;"/>
|
||||
<label id="allowScripts" value="&allowScripts.label;"/>
|
||||
|
||||
<listbox id="AllowList">
|
||||
<listitem type="checkbox" id="allowWindowOpen" label="&allowWindowOpen.label;"/>
|
||||
<listitem type="checkbox" id="allowTargetNew" label="&allowTargetNew.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowMoveResize" label="&allowWindowMoveResize.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowFlip" label="&allowWindowFlip.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowStatusChange" label="&allowWindowStatusChange.label;"/>
|
||||
<listitem type="checkbox" id="allowImageSrcChange" label="&allowWindowImageSrcChange.label;"/>
|
||||
<listitem type="checkbox" id="allowDocumentCookieSet" label="&allowDocumentCookieSet.label;"/>
|
||||
<listitem type="checkbox" id="allowDocumentCookieGet" label="&allowDocumentCookieGet.label;"/>
|
||||
</listbox>
|
||||
<listbox id="AllowList" flex="1">
|
||||
<listitem type="checkbox" id="allowWindowOpen" label="&allowWindowOpen.label;"/>
|
||||
<listitem type="checkbox" id="allowTargetNew" label="&allowTargetNew.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowMoveResize" label="&allowWindowMoveResize.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowFlip" label="&allowWindowFlip.label;"/>
|
||||
<listitem type="checkbox" id="allowWindowStatusChange" label="&allowWindowStatusChange.label;"/>
|
||||
<listitem type="checkbox" id="allowImageSrcChange" label="&allowWindowImageSrcChange.label;"/>
|
||||
<listitem type="checkbox" id="allowDocumentCookieSet" label="&allowDocumentCookieSet.label;"/>
|
||||
<listitem type="checkbox" id="allowDocumentCookieGet" label="&allowDocumentCookieGet.label;"/>
|
||||
</listbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="pluginPreferences">
|
||||
<caption label="&enablePlugin.label;"/>
|
||||
|
||||
<!-- mailnews will add its checkbox here using overlay (mailPrefOverlay.xul).
|
||||
The day we add a checkbox for plugins in browser, please do the following:
|
||||
1) make sure that doesn't break the mailnews overlay, we'll probably have to add an
|
||||
insertafter command to insure the proper order of the checkboxes
|
||||
2) remove the js code in pref-scripts.js that hide this groupbox when not checkbox
|
||||
has been defined (function Startup)
|
||||
-->
|
||||
</groupbox>
|
||||
|
||||
</page>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<!-- extracted from content/pref-scripts.xul -->
|
||||
|
||||
<!--LOCALIZATION NOTE : FILE The 'Scripts & Windows' preferences dialog -->
|
||||
<!ENTITY lHeader "Scripts & Windows">
|
||||
<!--LOCALIZATION NOTE : FILE The 'Scripts & Plugins' preferences dialog -->
|
||||
<!ENTITY lHeader "Scripts & Plugins">
|
||||
|
||||
<!--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 for">
|
||||
<!ENTITY allowScripts.label "Allow webpages to:">
|
||||
<!ENTITY allowWindowOpen.label "Open unrequested windows">
|
||||
<!ENTITY allowTargetNew.label "Open a link in a new window (requires restarting &brandShortName;)">
|
||||
|
@ -17,3 +17,5 @@
|
|||
<!ENTITY allowWindowImageSrcChange.label "Change images">
|
||||
<!ENTITY allowDocumentCookieSet.label "Create or change cookies">
|
||||
<!ENTITY allowDocumentCookieGet.label "Read cookies">
|
||||
|
||||
<!ENTITY enablePlugin.label "Enable Plugins for">
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
<!ENTITY search.label "Internet Search">
|
||||
<!ENTITY policies.label "Security Policies">
|
||||
<!ENTITY mousewheel.label "Mouse Wheel">
|
||||
<!ENTITY scriptsAndWindows.label "Scripts & Windows">
|
||||
<!ENTITY scriptsAndWindows.label "Scripts & Plugins">
|
||||
|
|
Загрузка…
Ссылка в новой задаче