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