mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-20 09:52:17 +01:00
Merge pull request #794 from owncloud/confirm-addressbook-delete
add confirmation before deleting an addressbook
This commit is contained in:
commit
be4e2739b2
@ -62,9 +62,14 @@ OC.Contacts = OC.Contacts || {};
|
||||
}
|
||||
));
|
||||
this.$li.find('a.action.delete').on('click keypress', function() {
|
||||
$('.tipsy').remove();
|
||||
console.log('delete', self.getId());
|
||||
self.destroy();
|
||||
OC.dialogs.confirm(t('contacts', 'Are you sure you want to delete the addressbook {addressbook} ?', {addressbook: self.getDisplayName()}),
|
||||
t('contacts', 'Remove addressbook'), function(answer) {
|
||||
if (answer) {
|
||||
$('.tipsy').remove();
|
||||
console.log('delete', self.getId());
|
||||
self.destroy();
|
||||
}
|
||||
});
|
||||
});
|
||||
this.$li.find('a.action.carddav').on('click keypress', function() {
|
||||
var uri = (self.book.owner === oc_current_user ) ? self.book.uri : self.book.uri + '_shared_by_' + self.book.owner;
|
||||
|
Loading…
x
Reference in New Issue
Block a user