[IMP] removes the expand/fold menu, because the search view covers the same functionality (addon web_graph)

bzr revid: ged@openerp.com-20131212105533-uawad2hgqopfkygo
This commit is contained in:
Gery Debongnie 2013-12-12 11:55:33 +01:00
parent d27b9ab563
commit e0ee9a58c5
3 changed files with 28 additions and 38 deletions

View File

@ -34,3 +34,24 @@ tr.graph_top li {
background-color: rgb(245,245,245);
}
.graph_view .dropdown-menu {
font-size: 13px;
padding: 4px 0;
background: #e8e8e8 !important;
background: #e8e8e8 !important;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.15);
font-color: !important black;
background-color: #e8e8e8;
text-shadow: none;
background-color: #e8e8e8;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.graph_view .dropdown-menu li a, .graph_view .dropdown-menu li a:hover, .graph_view .dropdown-menu li a:focus {
color: black;
text-decoration: none;
}

View File

@ -24,7 +24,6 @@ instance.web_graph.GraphView = instance.web.View.extend({
events: {
'click .graph_mode_selection li' : 'mode_selection',
'click .graph_measure_selection li' : 'measure_selection',
'click .graph_expand_selection li' : 'expand_selection',
'click .graph_options_selection li' : 'option_selection',
'click .web_graph_click' : 'cell_click_callback',
'click a.field-selection' : 'field_selection',
@ -269,29 +268,6 @@ instance.web_graph.GraphView = instance.web.View.extend({
this.display_data();
},
expand_selection: function (event) {
event.preventDefault();
switch (event.target.attributes['data-choice'].nodeValue) {
case 'fold_columns':
this.pivot_table.fold_cols();
this.register_groupby();
break;
case 'fold_rows':
this.pivot_table.fold_rows();
this.register_groupby();
break;
case 'fold_all':
this.pivot_table.fold_cols();
this.pivot_table.fold_rows();
this.register_groupby();
break;
case 'expand_all':
this.pivot_table.invalidate_data();
this.display_data();
break;
}
},
option_selection: function (event) {
event.preventDefault();
switch (event.target.attributes['data-choice'].nodeValue) {
@ -299,6 +275,10 @@ instance.web_graph.GraphView = instance.web.View.extend({
this.pivot_table.swap_axis();
this.register_groupby();
break;
case 'expand_all':
this.pivot_table.invalidate_data();
this.display_data();
break;
case 'update_values':
this.pivot_table.stale_data = true;
this.display_data();
@ -368,7 +348,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
return $('<span> </span>')
.addClass('web_graph_click')
.attr('href', '#')
.addClass((header.is_expanded) ? 'icon-minus-sign' : 'icon-plus-sign')
.addClass((header.is_expanded) ? 'fa fa-minus-square' : 'fa fa-plus-square')
.append((header.title !== undefined) ? header.title : 'Undefined');
},

View File

@ -1,5 +1,5 @@
<templates>
<div t-name="GraphView">
<div t-name="GraphView" class="graph_view">
<div class="graph_header">
<div class="btn-group">
<label type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@ -24,24 +24,13 @@
<li><a data-choice="__count" href="#">Count</a></li>
</ul>
</div>
<div class="btn-group">
<label type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Fold/Expand <span class="caret"></span>
</label>
<ul class="dropdown-menu graph_expand_selection" role="menu">
<li><a data-choice="fold_columns" href="#">Fold Columns</a></li>
<li><a data-choice="fold_rows" href="#">Fold Rows</a></li>
<li><a data-choice="fold_all" href="#">Fold All</a></li>
<li role="presentation" class="divider"></li>
<li><a data-choice="expand_all" href="#">Expand All</a></li>
</ul>
</div>
<div class="btn-group">
<label type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Options <span class="caret"></span>
</label>
<ul class="dropdown-menu graph_options_selection" role="menu">
<li><a data-choice="swap_axis" href="#">Swap Axis</a></li>
<li><a data-choice="expand_all" href="#">Expand All</a></li>
<li><a data-choice="update_values" href="#">Update all values</a></li>
<li><a data-choice="export_data" href="#">Export data</a></li>
</ul>