mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Edit dialog remained if you deleted an address book while editing it. oc-1657
This commit is contained in:
parent
c4c6323432
commit
0b42a3fb83
@ -34,10 +34,13 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
|
||||
if(check == false){
|
||||
return false;
|
||||
} else {
|
||||
var row = $('.addressbooks-settings tr[data-id="'+id+'"]');
|
||||
OC.Contacts.loading(row.find('.name'));
|
||||
$.post(OC.filePath('contacts', 'ajax', 'addressbook/delete.php'), { id: id}, function(jsondata) {
|
||||
if (jsondata.status == 'success'){
|
||||
$('#contacts h3[data-id="'+id+'"],#contacts ul[data-id="'+id+'"]').remove();
|
||||
$('.addressbooks-settings tr[data-id="'+id+'"]').remove()
|
||||
row.remove()
|
||||
OC.Contacts.Settings.Addressbook.showActions(['new',]);
|
||||
OC.Contacts.Contacts.update();
|
||||
} else {
|
||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user