[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
This commit is contained in:
parent
c236ed8175
commit
065b3c2176
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue