aboutsummaryrefslogtreecommitdiffstats
path: root/apps/contacts/js/interface.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/js/interface.js')
-rw-r--r--apps/contacts/js/interface.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js
index fe58a46d247..5908dd767a2 100644
--- a/apps/contacts/js/interface.js
+++ b/apps/contacts/js/interface.js
@@ -124,12 +124,14 @@ Contacts={
url = OC.filePath('contacts', 'ajax', 'updateaddressbook.php');
}
$.post(url, { id: bookid, name: displayname, active: active, description: description },
- function(data){
- if(data.status == 'success'){
+ function(jsondata){
+ if(jsondata.status == 'success'){
$(button).closest('tr').prev().html(data.page).show().next().remove();
+ Contacts.UI.Contacts.update();
+ } else {
+ Contacts.UI.messageBox(t('contacts', 'Error'), jsondata.data.message);
}
});
- Contacts.UI.Contacts.update();
},
cancel:function(button, bookid){
$(button).closest('tr').prev().show().next().remove();