[IMP] web_kanban_sparkline: don't show the value in the tooltip for the sparklines of type 'tristate'

bzr revid: qdp-launchpad@openerp.com-20140106131605-8lfp6dzpnl9vor09
This commit is contained in:
Quentin (OpenERP) 2014-01-06 14:16:05 +01:00
parent a5f3084ac4
commit 5881686194
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten
var value = _.pluck(self.field.value, 'value');
var tooltips = _.pluck(self.field.value, 'tooltip');
var suffix = self.options.tooltip_suffix || "";
var tooltipFormat = self.options.type == 'tristate' && '{{offset:offset}}' + suffix || '{{offset:offset}} {{value:value}}' + suffix
var sparkline_options = _.extend({
type: 'bar',
barWidth: 5,
@ -21,7 +22,7 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten
barWidth: 4,
barSpacing: 1,
barColor: '#96d854',
tooltipFormat: '{{offset:offset}} {{value}} ' + suffix,
tooltipFormat: tooltipFormat,
chartRangeMin: 0,
tooltipValueLookups: {
'offset': tooltips