зеркало из https://github.com/mozilla/pjs.git
Bug 266945 - Add confirm prompt for 'Remove All' operation in Password Manager. r+a181=mconnor.
This commit is contained in:
Родитель
4d0ece1685
Коммит
dc1e598373
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче