[FIX] web: properly remove nvd3 tooltips

We fixed it for the graph view in 6bdf72bac5f6e8 but this
needs to be fixed for every views.
This commit is contained in:
Martin Geubelle
2016-01-27 16:31:16 +01:00
committed by Géry Debongnie
parent 36994a6616
commit f19210ee08
2 changed files with 3 additions and 4 deletions
@@ -180,6 +180,9 @@ var ViewManagerAction = WidgetAction.extend({
* @return {jQuery} the view_manager's $el
*/
detach: function() {
// Hack to remove badly inserted nvd3 tooltips ; should be removed when upgrading nvd3 lib
$('body > .nvtooltip').remove();
return this.widget.$el.detach();
},
/**
@@ -19,10 +19,6 @@ var GraphView = View.extend({
icon: 'fa-bar-chart',
view_type: 'graph',
on_detach_callback: function () {
$('body > .nvtooltip').remove();
},
init: function(parent, dataset, view_id, options) {
this._super(parent, dataset, view_id, options);