diff options
Diffstat (limited to 'assets/js/src/Popover.js')
-rw-r--r-- | assets/js/src/Popover.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/assets/js/src/Popover.js b/assets/js/src/Popover.js index 4c806278..910c54b0 100644 --- a/assets/js/src/Popover.js +++ b/assets/js/src/Popover.js @@ -13,6 +13,10 @@ Kanboard.Popover.prototype.listen = function() { self.close(e); }); + $(document).on("click", "#popover-close-button", function(e) { + self.close(e); + }); + $(document).on("click", "#popover-content", function(e) { e.stopPropagation(); }); @@ -43,7 +47,15 @@ Kanboard.Popover.prototype.open = function(link) { if (!self.isOpen()) { $.get(link, function(content) { - $("body").prepend('<div id="popover-container"><div id="popover-content">' + content + '</div></div>'); + $("body").prepend( + '<div id="popover-container">' + + '<div id="popover-content">' + + '<div id="popover-content-header"><a href="#" id="popover-close-button"><i class="fa fa-times"></i></a></div>' + + content + + '</div>' + + '</div>' + ); + self.executeOnOpenedListeners(); }); } |