зеркало из 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:
Родитель
2a6e17e836
Коммит
37ee9e3520
|
@ -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" 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>
|
||||
|
||||
<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>
|
||||
</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">
|
||||
|
|
Загрузка…
Ссылка в новой задаче