Bug 381692 - "Page Info Security section should show site-specific saved passwords" [p=ehsan.akhgari@gmail.com (Ehsan Akhgari) r=Mano ui-r=johnath a1.9=schrep]

This commit is contained in:
reed@reedloden.com 2008-01-04 22:06:30 -08:00
Родитель 4e4ec04616
Коммит 54229a92e6
2 изменённых файлов: 20 добавлений и 2 удалений

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

@ -22,6 +22,7 @@
# Contributor(s):
# Terry Hayes <thayes@netscape.com>
# Florian QUEZE <f.qu@queze.net>
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -159,11 +160,14 @@ var security = {
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("Toolkit:PasswordManager");
if (win)
if (win) {
win.setFilter(this._getSecurityInfo().hostName);
win.focus();
}
else
window.openDialog("chrome://passwordmgr/content/passwordManager.xul",
"Toolkit:PasswordManager", "");
"Toolkit:PasswordManager", "",
{filterString : this._getSecurityInfo().hostName});
},
_cert : null

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

@ -25,6 +25,7 @@
# Ben "Count XULula" Goodger
# Brian Ryner <bryner@brianryner.com>
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
# Ronny Perinke <ronny.perinke@gmx.de>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -49,6 +50,12 @@ function SignonsStartup() {
document.getElementById("togglePasswords").label = kSignonBundle.getString("showPasswords");
document.getElementById("togglePasswords").accessKey = kSignonBundle.getString("showPasswordsAccessKey");
LoadSignons();
// filter the table if requested by caller
if (window.arguments && window.arguments[0] &&
window.arguments[0].filterString)
setFilter(window.arguments[0].filterString);
FocusFilterBox();
}
@ -322,3 +329,10 @@ function HandleSignonFilterKeyPress(aEvent) {
if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
SignonClearFilter();
}
function setFilter(aFilterString) {
if (document.getElementById("filter").value != "")
SignonClearFilter();
document.getElementById("filter").value = aFilterString;
_filterPasswords();
}