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

Thomas Tanghus thomas at tanghus.net
Fri Aug 2 13:48:28 UTC 2013


On Friday 02 August 2013 12:43 Andreas Borutta wrote:
> 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?

In short: You can't. It would require ugly hacks and slow down 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
-- 
Med venlig hilsen / Best Regards

Thomas Tanghus



More information about the Owncloud mailing list