From f710688d1759b55597c2c206f62a22cc9c8aebe8 Mon Sep 17 00:00:00 2001 From: aleca Date: Mon, 11 Mar 2019 18:05:36 -0700 Subject: [PATCH] Bug 1497795 - add confirmation for marking all folders as read. r=mkmelin --- mail/base/content/mailWindowOverlay.js | 8 ++++++++ mail/locales/en-US/chrome/messenger/messenger.properties | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 45332fd09e..02ef192f15 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -2259,6 +2259,14 @@ function MsgMarkAllRead() { * Go through each selected server and mark all its folders read. */ function MsgMarkAllFoldersRead() { + const bundle = document.getElementById("bundle_messenger"); + + if (!Services.prompt.confirm(window, + bundle.getString("confirmMarkAllFoldersReadTitle"), + bundle.getString("confirmMarkAllFoldersReadMessage"))) { + return; + } + const selectedFolders = gFolderTreeView.getSelectedFolders(); const selectedServers = selectedFolders.filter(folder => folder.isServer); diff --git a/mail/locales/en-US/chrome/messenger/messenger.properties b/mail/locales/en-US/chrome/messenger/messenger.properties index 4bedd841e7..17b37c66a1 100644 --- a/mail/locales/en-US/chrome/messenger/messenger.properties +++ b/mail/locales/en-US/chrome/messenger/messenger.properties @@ -327,6 +327,10 @@ confirmUnsubscribeTitle=Confirm Unsubscribe confirmUnsubscribeText=Are you sure you want to unsubscribe from %S? confirmUnsubscribeManyText=Are you sure you want to unsubscribe from these newsgroups? restoreAllTabs=Restore All Tabs + +confirmMarkAllFoldersReadTitle=Mark All Folders Read +confirmMarkAllFoldersReadMessage=Are you sure you want to mark all messages in all folders of this account as read? + # LOCALIZATION NOTE(junkBarMessage): %S is brand junkBarMessage=%S thinks this message is Junk mail. junkBarButton=Not Junk