1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Omit avatar character from sorting. Refs. #381

This commit is contained in:
Thomas Tanghus 2014-02-07 20:49:24 +01:00
parent 462290c78d
commit 898059b8ed

View File

@ -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