mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 09:53:23 +00:00
(js) Improve confirm dialogs for deletions
This commit is contained in:
@@ -89,7 +89,8 @@
|
||||
|
||||
function confirmDeleteSelectedCards() {
|
||||
Dialog.confirm(l('Warning'),
|
||||
l('Are you sure you want to delete the selected contacts?'))
|
||||
l('Are you sure you want to delete the selected contacts?'),
|
||||
{ ok: l('Delete') })
|
||||
.then(function() {
|
||||
// User confirmed the deletion
|
||||
var selectedCards = _.filter(vm.selectedFolder.cards, function(card) { return card.selected; });
|
||||
|
||||
@@ -97,7 +97,8 @@
|
||||
}
|
||||
else {
|
||||
Dialog.confirm(l('Warning'), l('Are you sure you want to delete the addressbook <em>%{0}</em>?',
|
||||
vm.service.selectedFolder.name))
|
||||
vm.service.selectedFolder.name),
|
||||
{ ok: l('Delete') })
|
||||
.then(function() {
|
||||
return vm.service.selectedFolder.$delete();
|
||||
})
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
function confirmDelete(card) {
|
||||
Dialog.confirm(l('Warning'),
|
||||
l('Are you sure you want to delete the card of %{0}?', card.$fullname()),
|
||||
{ok: l('Yes'), cancel: l('No')})
|
||||
{ ok: l('Delete') })
|
||||
.then(function() {
|
||||
// User confirmed the deletion
|
||||
card.$delete()
|
||||
|
||||
Reference in New Issue
Block a user