aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-08-02 18:57:03 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-08-02 18:57:03 +0200
commit8f3357c30596ff776636a8e5a8f6d3611d4fa1ba (patch)
treefce5155d75a38d4e3e33316488aebebb6a6bfc04 /apps
parenta484ee817cb1ee1daad9341d90d9b36fc0ada7d5 (diff)
downloadnextcloud-server-8f3357c30596ff776636a8e5a8f6d3611d4fa1ba.tar.gz
nextcloud-server-8f3357c30596ff776636a8e5a8f6d3611d4fa1ba.zip
I was a bit too fast in removing methods yesterday...
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/js/contacts.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index a708352cba0..2521a6ce843 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -1499,6 +1499,20 @@ OC.Contacts={
//this.contacts[id] = contact;
return contact;
},
+ addAddressbook:function(name, description, cb) {
+ $.post(OC.filePath('contacts', 'ajax/addressbook', 'add.php'), { name: name, description: description, active: true },
+ function(jsondata) {
+ if(jsondata.status == 'success'){
+ if(cb && typeof cb == 'function') {
+ console.log('addressbook:', jsondata.data.addressbook);
+ cb(jsondata.data.addressbook);
+ }
+ } else {
+ OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
+ return false;
+ }
+ });
+ },
doImport:function(file, aid){
$.post(OC.filePath('contacts', '', 'import.php'), { id: aid, file: file, fstype: 'OC_FilesystemView' },
function(jsondata){