summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph.js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2013-11-26 16:19:06 +0100
committerGery Debongnie <ged@openerp.com>2013-11-26 16:19:06 +0100
commit4eef57206502a1d3201f256027d370f3cf386c5f (patch)
treed4d982357aed3fe175d2522fbd73760aebabb4ca /addons/web_graph/static/src/js/graph.js
parentd8aa7a6551ddb0b540cd14c35d4482d79f746fb5 (diff)
[IMP] big commit: add query_all_values() method to pivot table, and uses it to add expand_all and update_values functionality to graph view (addon web_graph)
bzr revid: ged@openerp.com-20131126151906-luj8ri6e4hj444h6
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
-rw-r--r--addons/web_graph/static/src/js/graph.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 2c3645341d8..2aeb68b9869 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -73,6 +73,10 @@ instance.web_graph.GraphView = instance.web.View.extend({
'click label.graph_expand_all' : function (event) {
this.pivot_table.expand_all().then(this.proxy('draw_table'));
},
+
+ 'click label.graph_update_values' : function (event) {
+ this.pivot_table.update_values().then(this.proxy('draw_table'));
+ },
},
view_loading: function (fields_view_get) {
@@ -157,7 +161,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
self.pivot_table = new PivotTable(self.data);
self.pivot_table.start().then(self.proxy('draw_table'));
} else {
- this.pivot_table.update_values.done(function () {
+ this.pivot_table.update_values().done(function () {
self.draw_table();
});
}
@@ -240,7 +244,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
.addClass('web_graph_click')
.attr('href', '#')
.addClass((header.is_expanded) ? 'icon-minus-sign' : 'icon-plus-sign')
- .append(header.name);
+ .append((header.title !== undefined) ? header.title : 'Undefined');
},
draw_top_headers: function () {