Skip to content

Commit

Permalink
Fix popover on monitor page
Browse files Browse the repository at this point in the history
We need to set the popover trigger after we change the page on a datatable, otherwise
the popovers do not work.

See #6470.
  • Loading branch information
ChrisBr committed Dec 10, 2018
1 parent d37bfd6 commit d66c576
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api/app/assets/javascripts/webui2/project_monitor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
function setupPopover() {
$('[data-toggle="popover"]').popover({ trigger: 'hover click' });
}
function setupProjectMonitor() { // jshint ignore:line
initializeDataTable('#project-monitor-table', { // jshint ignore:line
scrollX: true,
Expand All @@ -10,7 +13,11 @@ function setupProjectMonitor() { // jshint ignore:line
}
});

$('[data-toggle="popover"]').popover({ trigger: 'hover click' });
$('#project-monitor-table').on('draw.dt', function () {
setupPopover();
});

setupPopover();

$('.monitor-no-filter-link').on('click', function () {
$(this).siblings().children('input:checked').prop('checked', false);
Expand Down

0 comments on commit d66c576

Please sign in to comment.