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:
parent
3e1dedf8ac
commit
15e64b86b8
@ -484,9 +484,9 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
var $phototools = this.$fullelem.find('#phototools');
|
var $phototools = this.$fullelem.find('#phototools');
|
||||||
console.log('photowrapper', this.$photowrapper.length);
|
console.log('photowrapper', this.$photowrapper.length);
|
||||||
delete this.photo;
|
delete this.photo;
|
||||||
|
$('img.contactphoto').remove()
|
||||||
this.photo = new Image();
|
this.photo = new Image();
|
||||||
$(this.photo).load(function () {
|
$(this.photo).load(function () {
|
||||||
$('img.contactphoto').remove()
|
|
||||||
$(this).addClass('contactphoto');
|
$(this).addClass('contactphoto');
|
||||||
self.$photowrapper.css('width', $(this).get(0).width + 10);
|
self.$photowrapper.css('width', $(this).get(0).width + 10);
|
||||||
self.$photowrapper.removeClass('loading').removeClass('wait');
|
self.$photowrapper.removeClass('loading').removeClass('wait');
|
||||||
|
Loading…
Reference in New Issue
Block a user