diff options
| author | Gery Debongnie <ged@openerp.com> | 2013-11-20 12:17:28 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2013-11-20 12:17:28 +0100 |
| commit | fde3f47a2e21afbee6d7ec575590e97a05a3eb98 (patch) | |
| tree | 66a73cda9769f6d0fea7bfacf6969378525d1024 /addons/web_graph/static/src/js/graph.js | |
| parent | 01a4fc36240711c535db253189a21edd9fd38fd7 (diff) | |
[FIX] properly clears the current rows when building pivot table (addon web_graph)
bzr revid: ged@openerp.com-20131120111728-3aqr9xxz8kdhkfg6
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 606de2ba2a9..6e9e20d943a 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -275,6 +275,8 @@ var PivotTable = instance.web.Widget.extend({ build_table: function () { var self = this; + this.rows = []; + var col_id = this.generate_id(); @@ -287,7 +289,6 @@ var PivotTable = instance.web.Widget.extend({ children: [], cells: [], // a cell is {td:<jquery td>, row_id:<some id>} domain: this.data.domain, - // header: col_header }]; self.make_top_headers(); @@ -375,33 +376,17 @@ var PivotTable = instance.web.Widget.extend({ header.addClass('graph_top'); this.headers = [header]; } else { - console.log("cols",this.cols); var height = _.max(_.map(self.cols, function(g) {return g.path.length;})); - console.log("height",height); var header_rows = make_header_cells(_.rest(this.cols), height); header_rows[0].splice(0,0,self.make_cell('', {is_border:true, }).attr('rowspan', height)) - console.log("header rows",header_rows); self.headers = []; _.each(header_rows, function (cells) { header = $('<tr></tr>'); - console.log("cells",cells); header.append(cells); header.addClass('graph_top'); self.headers.push(header); }); - - // header = - // header.append(this.make_cell('', {is_border:true, }).attr('rowspan', height)); - - // _.each(this.cols, function (col) { - // if (col.children.length === 0) { - // var options = {is_border: true, foldable:true, col_id: col.id}; - // header.append(self.make_cell(col.value, options)); - // } - // }); - // header.addClass('graph_top'); - // this.headers = [header]; } }, |
