mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-31 20:52:17 +01:00
DOM elements were cached after remove()'d
This commit is contained in:
parent
68ef8353fa
commit
92db1d5dfc
@ -1621,19 +1621,17 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
src;
|
src;
|
||||||
|
|
||||||
var $phototools = this.$fullelem.find('#phototools');
|
var $phototools = this.$fullelem.find('#phototools');
|
||||||
if(!this.$photowrapper) {
|
var $photowrapper = this.$fullelem.find('#photowrapper');
|
||||||
this.$photowrapper = this.$fullelem.find('#photowrapper');
|
|
||||||
}
|
|
||||||
|
|
||||||
var finishLoad = function(image) {
|
var finishLoad = function(image) {
|
||||||
console.log('finishLoad', self.getDisplayName(), image.width, image.height);
|
console.log('finishLoad', self.getDisplayName(), image.width, image.height);
|
||||||
$(image).addClass('contactphoto');
|
$(image).addClass('contactphoto');
|
||||||
self.$photowrapper.removeClass('loading wait');
|
$photowrapper.removeClass('loading wait');
|
||||||
self.$photowrapper.css({width: image.width + 10, height: image.height + 10});
|
$photowrapper.css({width: image.width + 10, height: image.height + 10});
|
||||||
$(image).insertAfter($phototools).fadeIn();
|
$(image).insertAfter($phototools).fadeIn();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$photowrapper.addClass('loading').addClass('wait');
|
$photowrapper.addClass('loading').addClass('wait');
|
||||||
console.log('hasPhoto', this.hasPhoto());
|
console.log('hasPhoto', this.hasPhoto());
|
||||||
if(!this.hasPhoto()) {
|
if(!this.hasPhoto()) {
|
||||||
$.when(this.storage.getDefaultPhoto())
|
$.when(this.storage.getDefaultPhoto())
|
||||||
@ -1659,7 +1657,7 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.isEditable()) {
|
if(this.isEditable()) {
|
||||||
this.$photowrapper.on('mouseenter', function(event) {
|
$photowrapper.on('mouseenter', function(event) {
|
||||||
if($(event.target).is('.favorite') || !self.data) {
|
if($(event.target).is('.favorite') || !self.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user