diff --git a/js/settings.js b/js/settings.js index 6f704658..3dc18b6c 100644 --- a/js/settings.js +++ b/js/settings.js @@ -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'));