1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Show/hide firstrun better. Fix #656

This commit is contained in:
Thomas Tanghus 2013-03-04 17:57:46 +01:00
parent 574cec4b60
commit 1d2dfd7ff9
2 changed files with 6 additions and 3 deletions

View File

@ -908,6 +908,8 @@ OC.Contacts = OC.Contacts || {
groups: self.groups.categories,
currentgroup: {id:self.currentgroup, name:self.groups.nameById(self.currentgroup)}
};
self.$firstRun.hide();
self.$contactList.show();
self.tmpcontact = self.contacts.addContact(groupprops);
self.$rightContent.prepend(self.tmpcontact);
self.hideActions();
@ -920,8 +922,6 @@ OC.Contacts = OC.Contacts || {
});
this.$firstRun.on('click keydown', '.addcontact', function(event) {
self.$firstRun.hide();
self.$contactList.show();
if(wrongKey(event)) {
return;
}
@ -1338,6 +1338,9 @@ OC.Contacts = OC.Contacts || {
delete this.currentid;
this.showActions(['add']);
this.$groups.find('optgroup,option:not([value="-1"])').remove();
if(this.contacts.length === 0) {
$(document).trigger('status.nomorecontacts');
}
//$('body').unbind('click', this.bodyListener);
},
openContact: function(id) {

View File

@ -1621,7 +1621,7 @@ OC.Contacts = OC.Contacts || {};
this.$contactFullTemplate,
this.contactDetailTemplates
);
if(this.currentContact) {
if(utils.isUInt(this.currentContact)) {
console.assert(typeof this.currentContact == 'number', 'this.currentContact is not a number');
this.contacts[this.currentContact].close();
}