[FIX] disable export to xls button in graph view when there are no data to export, this prevent a crash (addon web)

bzr revid: ged@openerp.com-20140422145955-vfls1hxktnq8m67b
This commit is contained in:
Gery Debongnie 2014-04-22 16:59:55 +02:00
parent 00cb732ea0
commit c3c56bb2b1
1 changed files with 1 additions and 0 deletions

View File

@ -502,6 +502,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
this.$('.graph_main_content div').remove();
this.table.empty();
this.table.toggleClass('heatmap', this.heatmap_mode !== 'none');
this.$('.graph_options_selection label').last().toggleClass('disabled', this.pivot.no_data);
this.width = this.$el.width();
this.height = Math.min(Math.max(document.documentElement.clientHeight - 116 - 60, 250), Math.round(0.8*this.$el.width()));