







diff --git a/CHANGELOG.md b/CHANGELOG.md index 818e8eec..3162acfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ Several pages already work without any AngularJS code: - After a successful login, redirect the user to where it was before being redirected to the login page +- When the mouse hovers a report in the dashboard sidebar, the corresponding + report in the dashboard view is highlighted to help locate where a report + is used. ### Fixed diff --git a/public/css/main.css b/public/css/main.css index f0c0b232..83b68730 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -3232,3 +3232,7 @@ a.list-group-item:hover { .label-lg { font-size: 1em; } + +[report-view].hovered { + outline: auto; +} diff --git a/public/js/ng/dashboard-edit/dashboard-edit.component.js b/public/js/ng/dashboard-edit/dashboard-edit.component.js index 2789cce7..39fb0687 100644 --- a/public/js/ng/dashboard-edit/dashboard-edit.component.js +++ b/public/js/ng/dashboard-edit/dashboard-edit.component.js @@ -21,6 +21,8 @@ vm.onFilterPromptDragStart = onFilterPromptDragStart; vm.onLayoutDragStart = onLayoutDragStart; vm.onReportDragStart = onReportDragStart; + vm.onReportMouseEnter = onReportMouseEnter; + vm.onReportMouseLeave = onReportMouseLeave; $scope.reportModal = 'partials/report-edit/report-edit.component.html'; $scope.settingsTemplate = 'partials/widgets/inspector.html'; @@ -553,5 +555,17 @@ repaintReports(); } } + + function onReportMouseEnter (ev) { + document.querySelectorAll('#REPORT_CONTAINER_' + ev.currentTarget.id).forEach(n => { + n.classList.add('hovered'); + }); + } + + function onReportMouseLeave (ev) { + document.querySelectorAll('#REPORT_CONTAINER_' + ev.currentTarget.id).forEach(n => { + n.classList.remove('hovered'); + }); + } } })(); diff --git a/public/js/ng/dashboard-edit/dashboard-edit.templates.js b/public/js/ng/dashboard-edit/dashboard-edit.templates.js index e3cbabfe..65b2a389 100644 --- a/public/js/ng/dashboard-edit/dashboard-edit.templates.js +++ b/public/js/ng/dashboard-edit/dashboard-edit.templates.js @@ -1,3 +1,3 @@ -(function(){'use strict';angular.module('app.dashboard-edit').run(['$templateCache', function($templateCache) {$templateCache.put('partials/dashboard-edit/dashboard-edit.component.html','