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

Made changing name order ~30% faster.

This commit is contained in:
Thomas Tanghus 2013-05-23 04:25:30 +02:00
parent d5ad910d57
commit eba736a03b

View File

@ -47,8 +47,10 @@ OC.Contacts = OC.Contacts || {};
return;
}
this.sortOrder = method;
var $elem = this.$listelem.find('.nametext');
$elem.text(escapeHTML(this.displayNames[method]));
// ~30% faster than jQuery.
this.$listelem.get(0).firstElementChild.getElementsByClassName('nametext')[0].innerHTML = escapeHTML(this.displayNames[method]);
//var $elem = this.$listelem.find('.nametext').text(escapeHTML(this.displayNames[method]));
//$elem.text(escapeHTML(this.displayNames[method]));
};
Contact.prototype.getId = function() {