mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-07 01:54:16 +01:00
Change avatar placeholder on sort order change, fixes owncloud#287.
This commit is contained in:
parent
38ab10ef3e
commit
8f05a6beca
@ -50,6 +50,7 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
// ~30% faster than jQuery.
|
// ~30% faster than jQuery.
|
||||||
try {
|
try {
|
||||||
this.$listelem.get(0).firstElementChild.getElementsByClassName('nametext')[0].innerHTML = escapeHTML(this.displayNames[method]);
|
this.$listelem.get(0).firstElementChild.getElementsByClassName('nametext')[0].innerHTML = escapeHTML(this.displayNames[method]);
|
||||||
|
this.setThumbnail();
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
var $elem = this.$listelem.find('.nametext').text(escapeHTML(this.displayNames[method]));
|
var $elem = this.$listelem.find('.nametext').text(escapeHTML(this.displayNames[method]));
|
||||||
$elem.text(escapeHTML(this.displayNames[method]));
|
$elem.text(escapeHTML(this.displayNames[method]));
|
||||||
@ -1577,7 +1578,7 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
Contact.prototype.setThumbnail = function($elem, refresh) {
|
Contact.prototype.setThumbnail = function($elem, refresh) {
|
||||||
if(!this.data.thumbnail && !refresh) {
|
if(!this.data.thumbnail && !refresh) {
|
||||||
this.getListItemElement().find('.avatar').css('height', '32px');
|
this.getListItemElement().find('.avatar').css('height', '32px');
|
||||||
this.getListItemElement().find('.avatar').imageplaceholder(this.getDisplayName());
|
this.getListItemElement().find('.avatar').imageplaceholder(this.getDisplayName()[0] || '#');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!$elem) {
|
if(!$elem) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user