hide help popovers when hiding the charts
Costa Tsaousis (ktsaou) committed
Nov 18, 2017 at 06:51 UTC
cb1374759c897db4a35911fa84f140daf67cfd62
1 file changed
+13
web/dashboard.js
+13
@@ -2326,6 +2326,7 @@ var NETDATA = window.NETDATA || {};
2326
that.element_chart = null; // the element with the chart
2327
that.element_legend = null; // the element with the legend of the chart (if created by us)
2328
that.element_legend_childs = {
2329
+ content: null,
2330
hidden: null,
2331
title_date: null,
2332
title_time: null,
@@ -2499,6 +2500,16 @@ var NETDATA = window.NETDATA || {};
2500
if(isHidden() === true) return;
2501
2502
if(that.chart_created === true) {
2503
+ if(NETDATA.options.current.show_help === true) {
2504
+ $(that.element_legend_childs.toolbox_left).popover('hide');
2505
+ $(that.element_legend_childs.toolbox_reset).popover('hide');
2506
+ $(that.element_legend_childs.toolbox_right).popover('hide');
2507
+ $(that.element_legend_childs.toolbox_zoomin).popover('hide');
2508
+ $(that.element_legend_childs.toolbox_zoomout).popover('hide');
2509
+ $(that.element_legend_childs.resize_handler).popover('hide');
2510
+ $(that.element_legend_childs.content).popover('hide');
2511
+ }
2512
+
2513
if(NETDATA.options.current.destroy_on_hide === true) {
2514
// that.log('hideChart() init');
2515
@@ -3830,6 +3841,8 @@ var NETDATA = window.NETDATA || {};
3841
content.className = 'netdata-legend-series-content';
3842
this.element_legend_childs.perfect_scroller.appendChild(content);
3843
3844
+ this.element_legend_childs.content = content;
3845
+
3846
if(NETDATA.options.current.show_help === true)
3847
$(content).popover({
3848
container: "body",