1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-02-07 01:54:16 +01:00

Merge pull request #801 from rehrumesh/786-TypeError-fix

#786 TypeError: addressBook is undefined error fixed
This commit is contained in:
jbtbnl 2015-02-10 13:42:02 +01:00
commit 4090d5672e

View File

@ -1094,6 +1094,7 @@ OC.notify = function(params) {
}); });
var addContact = function() { var addContact = function() {
if(self.contacts.addressBooks.count() > 0){
console.log('add'); console.log('add');
if(self.currentid) { if(self.currentid) {
if(self.currentid === 'new') { if(self.currentid === 'new') {
@ -1119,6 +1120,9 @@ OC.notify = function(params) {
self.tmpcontact.prependTo(self.$contactList.find('tbody')).show().find('.fullname').focus(); self.tmpcontact.prependTo(self.$contactList.find('tbody')).show().find('.fullname').focus();
self.$rightContent.scrollTop(0); self.$rightContent.scrollTop(0);
self.hideActions(); self.hideActions();
}else{
OC.dialogs.alert(t('contacts','Please create an addressbook first'),t('contacts','Contacts'));
}
}; };
this.$firstRun.on('click keydown', '.import', function(event) { this.$firstRun.on('click keydown', '.import', function(event) {