[Owncloud] [Contacts] Hack for sorting by last name

Andreas Borutta borumat at gmx.de
Fri Aug 2 10:43:38 UTC 2013


Thomas Tanghus schrieb:

>> Where please do I have to place that code?
> 
> In getDisplayName() as mentioned above ;)
> 
> Contact.prototype.getDisplayName = function() {
>     return this.getPreferredValue('N', [this.getPreferredValue('FN',[])]).slice(0, 2).join(', ');
> };

Thanks for your help, Thomas.
Works fine!

Please allow one further question:

How can you realize the following view/sorting?

Source:

Forename: Andreas	
Surname: Tanghus

Forename: Thomas
Surname: Borutta

View:

Thomas Borutta
Andreas Tanghus

It should be sorted by surname, but the pattern for the view should be
"Forename Surename".
Without a Comma of course. 


Andreas
-- 
http://borumat.de
http://fahrradzukunft.de




More information about the Owncloud mailing list