1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Contacts: Localized sorting.

This commit is contained in:
Thomas Tanghus 2012-09-06 23:46:07 +02:00
parent e0f9ed99d3
commit 56606afd1e

View File

@ -1660,7 +1660,7 @@ OC.Contacts={
var name = params.data ? params.data.displayname.toLowerCase() : contact.find('a').text().toLowerCase();
if(params.contacts) {
params.contacts.each(function() {
if ($(this).text().toLowerCase() > name) {
if ($(this).text().toLowerCase().localeCompare(name) > 0) {
$(this).before(contact);
added = true;
return false;
@ -1775,7 +1775,7 @@ OC.Contacts={
+ '" data-permissions="' + book.permissions + '"></ul>');
var added = false;
$('#contacts h3').each(function(){
if ($(this).text().toLowerCase() > book.displayname.toLowerCase()) {
if ($(this).text().toLowerCase().localeCompare(book.displayname.toLowerCase()) > 0) {
$(this).before(item).fadeIn('fast');
added = true;
return false;