diff options
| author | Gery Debongnie <ged@openerp.com> | 2013-12-12 11:55:33 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2013-12-12 11:55:33 +0100 |
| commit | e0ee9a58c547cd06d2d33018e43b02e549c10e9e (patch) | |
| tree | c47e160c63dd3740e4891a3e8dbc55c195260f9b /addons/web_graph/static/src | |
| parent | d27b9ab563cf1078cf9639bf96465816cb59da88 (diff) | |
[IMP] removes the expand/fold menu, because the search view covers the same functionality (addon web_graph)
bzr revid: ged@openerp.com-20131212105533-uawad2hgqopfkygo
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/css/graph.css | 21 | ||||
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 28 | ||||
| -rw-r--r-- | addons/web_graph/static/src/xml/web_graph.xml | 15 |
3 files changed, 27 insertions, 37 deletions
diff --git a/addons/web_graph/static/src/css/graph.css b/addons/web_graph/static/src/css/graph.css index f054a553d4f..12b0960277a 100644 --- a/addons/web_graph/static/src/css/graph.css +++ b/addons/web_graph/static/src/css/graph.css @@ -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; +} diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 918a698e7b7..912f56e79fc 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -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,36 +268,17 @@ instance.web_graph.GraphView = instance.web.View.extend({ this.display_data(); }, - expand_selection: function (event) { + option_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(); + case 'swap_axis': + this.pivot_table.swap_axis(); 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) { - case 'swap_axis': - this.pivot_table.swap_axis(); - this.register_groupby(); - 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'); }, diff --git a/addons/web_graph/static/src/xml/web_graph.xml b/addons/web_graph/static/src/xml/web_graph.xml index 9a969a23eae..8ebcecb01ce 100644 --- a/addons/web_graph/static/src/xml/web_graph.xml +++ b/addons/web_graph/static/src/xml/web_graph.xml @@ -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"> @@ -26,22 +26,11 @@ </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> |
