[FIX] correctly handles + and - signs on rows/columns expansion/folding (addon web_graph)
bzr revid: ged@openerp.com-20131120130748-mge1w8apby67miqm
This commit is contained in:
parent
215f665508
commit
53a8f56f03
|
@ -25,4 +25,8 @@ span.web_graph_indent {
|
|||
*/
|
||||
.web_graph_click:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tr.graph_top td {
|
||||
text-align: center;
|
||||
}
|
|
@ -339,6 +339,11 @@ var PivotTable = instance.web.Widget.extend({
|
|||
col_id: col.id,
|
||||
};
|
||||
var result = self.make_cell(col.value, options);
|
||||
if (col.expanded) {
|
||||
result.find('.icon-plus-sign')
|
||||
.removeClass('icon-plus-sign')
|
||||
.addClass('icon-minus-sign');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -432,9 +437,14 @@ var PivotTable = instance.web.Widget.extend({
|
|||
|
||||
_.each(this.cols, function (col) {
|
||||
col.cells.push({row_id: row_id, td: cell });
|
||||
// insert cells into corresponding col
|
||||
});
|
||||
|
||||
if (!has_parent) {
|
||||
header.find('.icon-plus-sign')
|
||||
.removeClass('icon-plus-sign')
|
||||
.addClass('icon-minus-sign');
|
||||
}
|
||||
|
||||
var row = {
|
||||
id: row_id,
|
||||
path: path,
|
||||
|
@ -523,10 +533,6 @@ var PivotTable = instance.web.Widget.extend({
|
|||
this.data.col_groupby.push(field_id);
|
||||
}
|
||||
col.expanded = true;
|
||||
// col.header.find('.icon-plus-sign')
|
||||
// .removeClass('icon-plus-sign')
|
||||
// .addClass('icon-minus-sign');
|
||||
|
||||
|
||||
var visible_fields = this.data.row_groupby.concat(this.data.col_groupby, this.data.measure);
|
||||
query_groups_data(this.data.model, visible_fields, col.domain, this.data.row_groupby, field_id)
|
||||
|
|
Loading…
Reference in New Issue