mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-19 08:52:22 +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;
|
||||
|
||||
var $phototools = this.$fullelem.find('#phototools');
|
||||
if(!this.$photowrapper) {
|
||||
this.$photowrapper = this.$fullelem.find('#photowrapper');
|
||||
}
|
||||
var $photowrapper = this.$fullelem.find('#photowrapper');
|
||||
|
||||
var finishLoad = function(image) {
|
||||
console.log('finishLoad', self.getDisplayName(), image.width, image.height);
|
||||
$(image).addClass('contactphoto');
|
||||
self.$photowrapper.removeClass('loading wait');
|
||||
self.$photowrapper.css({width: image.width + 10, height: image.height + 10});
|
||||
$photowrapper.removeClass('loading wait');
|
||||
$photowrapper.css({width: image.width + 10, height: image.height + 10});
|
||||
$(image).insertAfter($phototools).fadeIn();
|
||||
};
|
||||
|
||||
this.$photowrapper.addClass('loading').addClass('wait');
|
||||
$photowrapper.addClass('loading').addClass('wait');
|
||||
console.log('hasPhoto', this.hasPhoto());
|
||||
if(!this.hasPhoto()) {
|
||||
$.when(this.storage.getDefaultPhoto())
|
||||
@ -1659,7 +1657,7 @@ OC.Contacts = OC.Contacts || {};
|
||||
}
|
||||
|
||||
if(this.isEditable()) {
|
||||
this.$photowrapper.on('mouseenter', function(event) {
|
||||
$photowrapper.on('mouseenter', function(event) {
|
||||
if($(event.target).is('.favorite') || !self.data) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user