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

Don't sort rows twice :P

This commit is contained in:
Thomas Tanghus 2013-06-01 18:04:50 +02:00
parent bb3012fa0f
commit 6c6d2aca8e

View File

@ -2288,16 +2288,6 @@ OC.Contacts = OC.Contacts || {};
.localeCompare($(b).find('td.name').text().toUpperCase());
});
}
rows.sort(function(a, b) {
// 10 (TEN!) times faster than using jQuery!
if(a.firstElementChild) {
return a.firstElementChild.textContent.trim().toUpperCase()
.localeCompare(b.firstElementChild.textContent.trim().toUpperCase());
} else {
return $(a).find('.nametext').text().toUpperCase()
.localeCompare($(b).find('td.name').text().toUpperCase());
}
});
this.$contactList.prepend(rows);
//console.timeEnd('sort');
}