UMB-CS682-Team-02 / tracker

0 stars 1 forks source link

Need to make clicking on 'Link >' in popup on chart bar/wedge open in _parent (do #93 first) #92

Open rouilj opened 6 months ago

rouilj commented 6 months ago

This is similar to #76. The copy of pygal-tooltips.js coming from my server is modified to open 'Link >' in new tab for debugging.

The current code uses an embed tag to show the chart. As a result the unmodified "https://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.js" opens the link in the embed, not in the window.

This patch to pygal-tooltips.js forces it to open in the parent window.

--- pygal-tooltips.js   2015-10-30 12:58:26.000000000 -0400
+++ html/pygal-tooltips.js  2024-05-01 21:16:24.290117579 -0400
@@ -242,6 +242,12 @@
           if (name === 'xlink') {
             a = document.createElementNS(svg_ns, 'a');
             a.setAttributeNS(xlink_ns, 'href', key);
+
+            // added by rouilj to get "Link >" in popup to open in
+            // parent window.
+       a.setAttribute("target", "_parent")
+            // end adding by rouilj
+
             a.textContent = void 0;
             a.appendChild(text);
             text.textContent = 'Link >';
rouilj commented 5 months ago

What commit on main branch implements this?