From 065b3c2176b8a7df31eeca2d2a6c87b27dd4a4fb Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Mon, 28 Apr 2014 11:02:21 +0200 Subject: [PATCH] [IMP] add the expand all button back to the graph view It was removed a long time ago, but it looks like the 'expand all' button is useful enough to make a comeback. Also, this commit removes a few useless lines in graph_widget about the grouped/stacked status of bar charts bzr revid: ged@openerp.com-20140428090221-po3ksrd73093w3qm --- addons/web_graph/static/src/js/graph_widget.js | 15 +++------------ addons/web_graph/static/src/xml/web_graph.xml | 3 +++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js index 317ea6cbfb9..923b488d17a 100644 --- a/addons/web_graph/static/src/js/graph_widget.js +++ b/addons/web_graph/static/src/js/graph_widget.js @@ -260,21 +260,12 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ option_selection: function (event) { event.preventDefault(); switch (event.currentTarget.getAttribute('data-choice')) { - case 'bar_grouped': - this.bar_ui = 'group'; - if (this.mode === 'bar') { - this.display_data(); - } - break; - case 'bar_stacked': - this.bar_ui = 'stack'; - if (this.mode === 'bar') { - this.display_data(); - } - break; case 'swap_axis': this.swap_axis(); break; + case 'expand_all': + this.pivot.expand_all().then(this.proxy('display_data')); + break; case 'update_values': this.pivot.update_data().then(this.proxy('display_data')); break; diff --git a/addons/web_graph/static/src/xml/web_graph.xml b/addons/web_graph/static/src/xml/web_graph.xml index 4522fd2504f..81804e5a9b1 100644 --- a/addons/web_graph/static/src/xml/web_graph.xml +++ b/addons/web_graph/static/src/xml/web_graph.xml @@ -35,6 +35,9 @@ +