Fix hovercard vanish

This commit is contained in:
Philipp Holzer 2019-05-26 21:42:49 +02:00
parent ea218438d2
commit 78a20e5acb
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
7 changed files with 122 additions and 9 deletions

View file

@ -55,7 +55,7 @@ $(document).ready(function(){
var hctrigger = 'manual';
};
// Timeoute until the hover-card does appear
// Timeout until the hover-card does appear
setTimeout(function(){
if(targetElement.is(":hover") && parseInt(targetElement.attr('data-awaiting-hover-card'),10) == timeNow) {
if($('.hovercard').length == 0) { // no card if there already is one open
@ -81,6 +81,9 @@ $(document).ready(function(){
template: '<div class="popover hovercard" data-card-created="' + timeNow + '"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
content: data,
container: "body",
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
},
}).popover('show');
}
});

View file

@ -82,6 +82,9 @@ $(document).ready(function() {
trigger: "hover",
placement: "auto",
template: '<div class="popover hovercard event-card"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
},
});
}

View file

@ -106,7 +106,10 @@ $(document).ready(function(){
delay: {
show: 500,
hide: 100
}
},
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
},
});
// initialize the bootstrap-select