Bug 266945 - Add confirm prompt for 'Remove All' operation in Password Manager. r+a181=mconnor.

This commit is contained in:
mozilla.mano@sent.com 2007-05-14 22:55:21 -07:00
Родитель a2bd9be40a
Коммит 1b9bf3c875
1 изменённых файлов: 13 добавлений и 0 удалений

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

@ -163,6 +163,19 @@ function DeleteSignon() {
}
function DeleteAllSignons() {
var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
// Confirm the user wants to remove all passwords
var dummy = { value: false };
if (prompter.confirmEx(window,
null,
kSignonBundle.getString("removeAllPasswordsPrompt"),
prompter.BUTTON_TITLE_YES * prompter.BUTTON_POS_0 +
prompter.BUTTON_TITLE_NO * prompter.BUTTON_POS_1,
null, null, null, null, dummy) == 1) //1 = "No" button
return;
DeleteAllFromTree(signonsTree, signonsTreeView,
signons, deletedSignons,
"removeSignon", "removeAllSignons");