From 898059b8ed0bd97556622d755aeef20c7e92ccdf Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 7 Feb 2014 20:49:24 +0100 Subject: [PATCH] Omit avatar character from sorting. Refs. #381 --- js/contacts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/contacts.js b/js/contacts.js index ea0f52b9..b882ba25 100644 --- a/js/contacts.js +++ b/js/contacts.js @@ -2476,8 +2476,8 @@ OC.Contacts = OC.Contacts || {}; if(rows[0].firstElementChild && rows[0].firstElementChild.textContent) { rows.sort(function(a, b) { // 10 (TEN!) times faster than using jQuery! - return a.firstElementChild.textContent.trim().toUpperCase() - .localeCompare(b.firstElementChild.textContent.trim().toUpperCase()); + return a.firstElementChild.lastElementChild.textContent.trim().toUpperCase() + .localeCompare(b.firstElementChild.lastElementChild.textContent.trim().toUpperCase()); }); } else { // IE8 doesn't support firstElementChild or textContent