From 1e32b763f0e1da669d835b02fbf680f2deea0f65 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Sat, 23 Nov 2013 11:11:35 +0100 Subject: [IMP] add 'clear all groups' and 'swap axis' functionality to pivot table in addon web_graph bzr revid: ged@openerp.com-20131123101135-m0cx5eg0o41k7x2m --- addons/web_graph/static/src/js/graph.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'addons/web_graph/static/src/js/graph.js') diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index cfabdead833..da3f4257b33 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -57,6 +57,16 @@ instance.web_graph.GraphView = instance.web.View.extend({ .then(this.proxy('draw_table')); } }, + + 'click label.graph_swap_axis' : function (event) { + this.pivot_table.swap_axis(); + this.draw_table(); + }, + + 'click label.graph_clear_all' : function (event) { + this.pivot_table.clear_all(); + this.draw_table(); + }, }, view_loading: function (fields_view_get) { @@ -212,7 +222,6 @@ instance.web_graph.GraphView = instance.web.View.extend({ }, draw_table: function () { - console.log("cols",this.pivot_table.cols); this.table.empty(); this.draw_top_headers(); _.each(this.pivot_table.rows, this.proxy('draw_row')); -- cgit v1.2.3