[FIX] render the pivot table correctly (addon web_graph)

The code was bugged: it added a <tbody> tag around each rows instead of adding the rows to a single tbody.

bzr revid: ged@openerp.com-20140508112723-b6ffkmufwux1z0a7
This commit is contained in:
Gery Debongnie 2014-05-08 13:27:23 +02:00
parent b9c217e850
commit 1c87d5b6f4
1 changed files with 7 additions and 2 deletions

View File

@ -591,8 +591,13 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
rows_length, cells_length;
rows_length = rows.length;
var $tbody = $('<tbody>');
doc_fragment.append($tbody);
for (i = 0; i < rows_length; i++) {
$row = $('<tr>').append(make_cell(rows[i]));
$row = $('<tr>')
.attr('data-indent', rows[i].indent)
.append(make_cell(rows[i]));
cells_length = rows[i].cells.length;
cells_list = [];
@ -609,7 +614,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
cells_list[j] = hcell;
}
$row.append(cells_list.join(''));
doc_fragment.append($('<tbody>').append($row));
$tbody.append($row);
}
},