mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Added method to test if a contact is in a group.
This commit is contained in:
parent
e5c6665a05
commit
3600c6c74a
@ -111,7 +111,11 @@ GroupList.prototype.findById = function(id) {
|
||||
}
|
||||
|
||||
GroupList.prototype.isFavorite = function(contactid) {
|
||||
var $groupelem = this.findById('fav');
|
||||
return this.inGroup(contactid, 'fav');
|
||||
}
|
||||
|
||||
GroupList.prototype.inGroup = function(contactid, groupid) {
|
||||
var $groupelem = this.findById(groupid);
|
||||
var contacts = $groupelem.data('contacts');
|
||||
return (contacts.indexOf(contactid) !== -1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user