1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +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; return;
} }
this.sortOrder = method; this.sortOrder = method;
var $elem = this.$listelem.find('.nametext'); // ~30% faster than jQuery.
$elem.text(escapeHTML(this.displayNames[method])); 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() { Contact.prototype.getId = function() {