[Rt-commit] rt branch 5.0/saved-search-jschart-subquery created. rt-5.0.3-84-g66ad1d23a6

BPS Git Server git at git.bestpractical.com
Wed Aug 31 21:20:00 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/saved-search-jschart-subquery has been created
        at  66ad1d23a6348bfecbb311b7c61577c131577a56 (commit)

- Log -----------------------------------------------------------------
commit 66ad1d23a6348bfecbb311b7c61577c131577a56
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Sep 1 05:05:42 2022 +0800

    Make pie/bar in js charts clickable again for saved searches
    
    In 319f64de28 we supported multiple js charts on a single page, which
    generated canvas id attribute dynamaically, but it missed to update the
    id in js code that registers the click event. This commit updates that
    id accordingly.

diff --git a/share/html/Search/JSChart b/share/html/Search/JSChart
index bc3f9d3ac2..d5bd3a7df6 100644
--- a/share/html/Search/JSChart
+++ b/share/html/Search/JSChart
@@ -161,7 +161,7 @@ var searchChart = new Chart(ctx, {
 var group_by = <% JSON( \@GroupBy ) |n %>;
 var data_queries = <% JSON( \@data_queries ) |n %>;
 
-jQuery('#search-chart').click(function(e) {
+jQuery('[id="<% $id |n %>"]').click(function(e) {
     var slice = searchChart.getElementAtEvent(e);
     if ( !slice[0] ) return;
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list