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

Delete photo *before* adding it, not after...

This commit is contained in:
Thomas Tanghus 2012-10-19 22:19:05 +02:00
parent 3e1dedf8ac
commit 15e64b86b8

View File

@ -484,9 +484,9 @@ OC.Contacts = OC.Contacts || {};
var $phototools = this.$fullelem.find('#phototools');
console.log('photowrapper', this.$photowrapper.length);
delete this.photo;
$('img.contactphoto').remove()
this.photo = new Image();
$(this.photo).load(function () {
$('img.contactphoto').remove()
$(this).addClass('contactphoto');
self.$photowrapper.css('width', $(this).get(0).width + 10);
self.$photowrapper.removeClass('loading').removeClass('wait');