diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-02-04 13:34:43 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-02-04 17:09:32 +0000 |
| commit | eccf6ed458e2c41cd7baf9eb7b459c7f64cfa4d5 (patch) | |
| tree | df146297c9e93d5b20c65931b4593523ec062721 /addons/website_links/static/src | |
| parent | 56f2a70346fce521aacc1999fae26fe43f51b951 (diff) | |
[FIX] website_links: properly attach graph widgets to the hierarchy
Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.
closes odoo/odoo#44617
X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_links/static/src')
| -rw-r--r-- | addons/website_links/static/src/js/website_links_charts.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/website_links/static/src/js/website_links_charts.js b/addons/website_links/static/src/js/website_links_charts.js index 5afef3e1d36..1c006a7a2fe 100644 --- a/addons/website_links/static/src/js/website_links_charts.js +++ b/addons/website_links/static/src/js/website_links_charts.js @@ -171,27 +171,27 @@ publicWidget.registry.websiteLinksCharts = publicWidget.Widget.extend({ // Process all time line chart data var now = moment(); - self.charts.all_time_bar = new BarChart(this, beginDate, now, formattedClicksByDay); + self.charts.all_time_bar = new BarChart(self, beginDate, now, formattedClicksByDay); self.charts.all_time_bar.attachTo($('#all_time_clicks_chart')); // Process month line chart data beginDate = moment().subtract(30, 'days'); - self.charts.last_month_bar = new BarChart(this, beginDate, now, formattedClicksByDay); + self.charts.last_month_bar = new BarChart(self, beginDate, now, formattedClicksByDay); self.charts.last_month_bar.attachTo($('#last_month_clicks_chart')); // Process week line chart data beginDate = moment().subtract(7, 'days'); - self.charts.last_week_bar = new BarChart(this, beginDate, now, formattedClicksByDay); + self.charts.last_week_bar = new BarChart(self, beginDate, now, formattedClicksByDay); self.charts.last_week_bar.attachTo($('#last_week_clicks_chart')); // Process pie charts - self.charts.all_time_pie = new PieChart(this, _clicksByCountry); + self.charts.all_time_pie = new PieChart(self, _clicksByCountry); self.charts.all_time_pie.attachTo($('#all_time_countries_charts')); - self.charts.last_month_pie = new PieChart(this, _lastMonthClicksByCountry); + self.charts.last_month_pie = new PieChart(self, _lastMonthClicksByCountry); self.charts.last_month_pie.attachTo($('#last_month_countries_charts')); - self.charts.last_week_pie = new PieChart(this, _lastWeekClicksByCountry); + self.charts.last_week_pie = new PieChart(self, _lastWeekClicksByCountry); self.charts.last_week_pie.attachTo($('#last_week_countries_charts')); var rowWidth = $('#all_time_countries_charts').parent().width(); |
