From 2944752844ee3a98b4a5e0a2c35634a034b88acb Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Mon, 25 Nov 2013 08:42:00 +0100 Subject: [PATCH] [IMP] adds slight color to expanded rows to make it easier to see the subrows (addon web_graph) bzr revid: ged@openerp.com-20131125074200-6d3migzpl4x7c44s --- addons/web_graph/static/src/js/graph.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 146a9d3e865..e1234e6f489 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -310,7 +310,11 @@ instance.web_graph.GraphView = instance.web.View.extend({ if ((self.heat_map_mode) && (value !== undefined)) { var color = Math.floor(50 + 205*(pivot.total - value)/pivot.total); cell.css("background-color", "rgb(255," + color + "," + color + ")"); - } + } + if (row.is_expanded && (row.path.length <= 2)) { + var color = row.path.length * 5 + 240; + cell.css("background-color", "rgb(" + [color, color, color].join() + ")"); + } html_row.append(cell); } });