Skip to content

Commit

Permalink
action-list.js: Fix dashboard support
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Oct 10, 2023
1 parent 63f9b08 commit 2e467f3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion public/js/action-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@
return;
}

let dashboard = list.closest('.dashboard');
if (dashboard) {
dashboard.querySelectorAll('.action-list').forEach(otherList => {
if (otherList !== list) {
toDeactivateItems.push(..._this.getAllItems(otherList));
}
})
}

let lastActivatedUrl = null;
if (toActiveItems.includes(item)) {
lastActivatedUrl = item.dataset.icingaDetailFilter;
Expand All @@ -122,9 +131,12 @@
container.dataset.suspendAutorefresh = '';
}

if (! dashboard) {
_this.addSelectionCountToFooter(list);
}

_this.clearSelection(toDeactivateItems);
_this.setActive(toActiveItems);
_this.addSelectionCountToFooter(list);
_this.setLastActivatedItemUrl(lastActivatedUrl);
_this.loadDetailUrl(list, target.matches('a') ? target.getAttribute('href') : null);
}
Expand Down

0 comments on commit 2e467f3

Please sign in to comment.