summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2013-11-24 23:03:10 +0100
committerGery Debongnie <ged@openerp.com>2013-11-24 23:03:10 +0100
commit8396a03759741dfd6b10f7f5b339df8524cb80c6 (patch)
tree5a773a375e678ade272188598a4d97a6eee16ce9 /addons/web_graph/static/src
parent2ff7dd16fe8446493efcb5aad6df06ce858de229 (diff)
[IMP] removes a cell when it has been folded (addon web_graph)
bzr revid: ged@openerp.com-20131124220310-4o1okd02cotbqppq
Diffstat (limited to 'addons/web_graph/static/src')
-rw-r--r--addons/web_graph/static/src/js/pivot.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_graph/static/src/js/pivot.js b/addons/web_graph/static/src/js/pivot.js
index f8c71e14975..e310a7799f6 100644
--- a/addons/web_graph/static/src/js/pivot.js
+++ b/addons/web_graph/static/src/js/pivot.js
@@ -103,12 +103,17 @@ var PivotTable = openerp.web.Class.extend({
_.each(tree.children, tree_traversal);
}
tree_traversal(header);
+ var ids_to_remove = _.map(_.rest(list), function (h) { return h.id;});
+
header.root.headers = _.difference(header.root.headers, _.rest(list));
header.is_expanded = false;
var fold_lvls = _.map(header.root.headers, function(g) {return g.path.length;});
var new_groupby_length = _.max(fold_lvls);
header.root.groupby.splice(new_groupby_length);
header.children = [];
+ this.cells = _.reject(this.cells, function (cell) {
+ return (_.contains(ids_to_remove, cell.x) || _.contains(ids_to_remove, cell.y));
+ });
},
expand: function (row_id, field_id) {