| 675 | |
| 676 | handleOverviewButton: function (evt) { |
| 677 | const navigate = () => { |
| 678 | if (evt) { |
| 679 | history.pushState(null, '', evt.target.href); |
| 680 | } |
| 681 | OCA.Analytics.Navigation.closeMobileNavigation(); |
| 682 | OCA.Analytics.Sidebar?.close?.(); |
| 683 | OCA.Analytics.Navigation.collapseAllGroups(); |
| 684 | if (document.querySelector('#navigationDatasets .active')) { |
| 685 | document.querySelector('#navigationDatasets .active').classList.remove('active'); |
| 686 | } |
| 687 | // ToDo: Do not reload DB all the time as it is already in the background |
| 688 | document.getElementById('ulAnalytics').innerHTML = ''; |
| 689 | OCA.Analytics.Dashboard.init(); |
| 690 | }; |
| 691 | |
| 692 | evt?.preventDefault(); |
| 693 | OCA.Analytics.Navigation.confirmNavigation(navigate); |