diff options
| author | Thibault Delavallée <tde@openerp.com> | 2014-04-08 10:37:33 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-04-08 10:37:33 +0200 |
| commit | a74eb749ae38784f370a9eeb073c3bbf09b35bbd (patch) | |
| tree | 3c83c289f1cb493d887ee8b647616465885fb3c9 /addons/web_graph/static | |
| parent | 423f81bf5cf4dd9e949fcabbd2babe4fe3187676 (diff) | |
| parent | f1d3f2a0c42f1de5970b5f897c4e5b279d1ee23b (diff) | |
[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140401100513-e4iglorrxnj0ne8j
bzr revid: tde@openerp.com-20140403122017-zl668mpi0w5gwps0
bzr revid: tde@openerp.com-20140408083733-8plf5daah4c8yxxx
Diffstat (limited to 'addons/web_graph/static')
| -rw-r--r-- | addons/web_graph/static/src/css/graph.css | 8 | ||||
| -rw-r--r-- | addons/web_graph/static/src/js/graph_widget.js | 16 |
2 files changed, 16 insertions, 8 deletions
diff --git a/addons/web_graph/static/src/css/graph.css b/addons/web_graph/static/src/css/graph.css index 1949028d6d8..25ee5db9594 100644 --- a/addons/web_graph/static/src/css/graph.css +++ b/addons/web_graph/static/src/css/graph.css @@ -1,3 +1,11 @@ + /* + This is a hack for IE9 ... + Attrs : width and height are not take in consideration + */ +.openerp svg:not(:root) { + overflow: visible; +} + .graph_pivot_mode { position:initial; } diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js index 3f6acdf87a7..3d8d8fa2d98 100644 --- a/addons/web_graph/static/src/js/graph_widget.js +++ b/addons/web_graph/static/src/js/graph_widget.js @@ -381,11 +381,11 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ // Convert Pivot data structure into table structure : // compute rows, cols, colors, cell width, cell height, ... // ---------------------------------------------------------------------- - build_table: function() { + build_table: function(raw) { return { headers: this.build_headers(), measure_row: this.build_measure_row(), - rows: this.build_rows(), + rows: this.build_rows(raw), nbr_measures: this.pivot.measures.length, title: this.title, }; @@ -435,8 +435,8 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ return result; }, - make_cell: function (row, col, value, index) { - var formatted_value = openerp.web.format_value(value, {type:this.pivot.measures[index].type}), + make_cell: function (row, col, value, index, raw) { + var formatted_value = raw && !_.isUndefined(value) ? value : openerp.web.format_value(value, {type:this.pivot.measures[index].type}), cell = {value:formatted_value}; if (this.heatmap_mode === 'none') { return cell; } @@ -450,7 +450,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ return cell; }, - build_rows: function () { + build_rows: function (raw) { var self = this, pivot = this.pivot, m, cell; @@ -460,13 +460,13 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ _.each(pivot.get_cols_leaves(), function (col) { var values = pivot.get_values(row.id,col.id); for (m = 0; m < pivot.measures.length; m++) { - cells.push(self.make_cell(row,col,values[m], m)); + cells.push(self.make_cell(row,col,values[m], m, raw)); } }); if (pivot.get_cols_leaves().length > 1) { var totals = pivot.get_total(row); for (m = 0; m < pivot.measures.length; m++) { - cell = self.make_cell(row, pivot.main_col(), totals[m], m); + cell = self.make_cell(row, pivot.main_col(), totals[m], m, raw); cell.is_bold = 'true'; cells.push(cell); } @@ -743,7 +743,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ openerp.web.blockUI(); this.session.get_file({ url: '/web_graph/export_xls', - data: {data: JSON.stringify(this.build_table())}, + data: {data: JSON.stringify(this.build_table(true))}, complete: openerp.web.unblockUI, error: c.rpc_error.bind(c) }); |
