mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Add method to show/hide shared addressbooks.
This commit is contained in:
parent
6badc525d9
commit
3bbf951fda
@ -713,6 +713,23 @@ OC.Contacts = OC.Contacts || {};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show/hide contacts belonging to shared addressbooks.
|
||||
* @param boolean show. Whether to show or hide.
|
||||
*/
|
||||
ContactList.prototype.showSharedAddressbooks = function(show) {
|
||||
console.log('ContactList.showSharedAddressbooks', show);
|
||||
for(var contact in this.contacts) {
|
||||
if(this.contacts[contact].access.owner !== OC.currentUser) {
|
||||
if(show) {
|
||||
this.contacts[contact].getListItemElement().show();
|
||||
} else {
|
||||
this.contacts[contact].getListItemElement().hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show contacts in list
|
||||
* @param Array contacts. A list of contact ids.
|
||||
|
Loading…
Reference in New Issue
Block a user