Bug 1288557 - Part 1: Replace custom exceptions dialog with usage of permissions

This commit is contained in:
janekptacijarabaci 2018-04-26 22:45:38 +02:00 • committed by Roy Tam
commit 997e7cf404
3 changed files with 20 additions and 6 deletions

View file

@ -5,8 +5,8 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" > <!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" >
@ -35,7 +35,7 @@
<separator class="thin"/> <separator class="thin"/>
<label id="urlLabel" control="url" value="&address.label;" accesskey="&address.accesskey;"/> <label id="urlLabel" control="url" value="&address.label;" accesskey="&address.accesskey;"/>
<hbox align="start"> <hbox align="start">
<textbox id="url" flex="1" <textbox id="url" flex="1"
oninput="gPermissionManager.onHostInput(event.target);" oninput="gPermissionManager.onHostInput(event.target);"
onkeypress="gPermissionManager.onHostKeyPress(event);"/> onkeypress="gPermissionManager.onHostKeyPress(event);"/>
</hbox> </hbox>
@ -70,7 +70,7 @@
oncommand="gPermissionManager.onPermissionDeleted();"/> oncommand="gPermissionManager.onPermissionDeleted();"/>
<button id="removeAllPermissions" <button id="removeAllPermissions"
icon="clear" label="&removeallpermissions.label;" icon="clear" label="&removeallpermissions.label;"
accesskey="&removeallpermissions.accesskey;" accesskey="&removeallpermissions.accesskey;"
oncommand="gPermissionManager.onAllPermissionsDeleted();"/> oncommand="gPermissionManager.onAllPermissionsDeleted();"/>
</hbox> </hbox>
<spacer flex="1"/> <spacer flex="1"/>

View file

@ -131,9 +131,21 @@ var gSecurityPane = {
*/ */
showPasswordExceptions: function () showPasswordExceptions: function ()
{ {
let bundlePrefs = document.getElementById("bundlePreferences");
let params = {
blockVisible: true,
sessionVisible: false,
allowVisible: false,
hideStatusColumn: true,
prefilledHost: "",
permissionType: "login-saving",
windowTitle: bundlePrefs.getString("savedLoginsExceptions_title"),
introText: bundlePrefs.getString("savedLoginsExceptions_desc")
};
document.documentElement.openWindow("Toolkit:PasswordManagerExceptions", document.documentElement.openWindow("Toolkit:PasswordManagerExceptions",
"chrome://passwordmgr/content/passwordManagerExceptions.xul", "chrome://browser/content/preferences/permissions.xul",
"", null); null, params);
}, },
/** /**

View file

@ -23,6 +23,8 @@ popuppermissionstext=You can specify which websites are allowed to open pop-up w
popuppermissionstitle=Allowed Sites - Pop-ups popuppermissionstitle=Allowed Sites - Pop-ups
invalidURI=Please enter a valid hostname invalidURI=Please enter a valid hostname
invalidURITitle=Invalid Hostname Entered invalidURITitle=Invalid Hostname Entered
savedLoginsExceptions_title=Exceptions - Saved Logins
savedLoginsExceptions_desc=Logins for the following sites will not be saved:
#### Master Password #### Master Password