summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-04-28 11:02:21 +0200
committerGery Debongnie <ged@openerp.com>2014-04-28 11:02:21 +0200
commit065b3c2176b8a7df31eeca2d2a6c87b27dd4a4fb (patch)
treebb904cf4f8ddf45c252a390a0c1c0d0fa277d82e /addons
parentc236ed817577ce53745cb89dd2229c2f51d5e9e6 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/web_graph/static/src/js/graph_widget.js15
-rw-r--r--addons/web_graph/static/src/xml/web_graph.xml3
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 @@
<label class="btn btn-default" data-choice="swap_axis" title="Swap Axis">
<span class="fa fa-expand"></span>
</label>
+ <label class="btn btn-default" data-choice="expand_all" title="Expand All">
+ <span class="fa fa-arrows-alt"></span>
+ </label>
<label class="btn btn-default" data-choice="update_values" title="Reload Data">
<span class="fa fa-refresh"></span>
</label>