summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2012-11-12 14:55:13 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2012-11-12 14:55:13 +0530
commitd8034fa4f4afe2fdfc81194167ededa4a4ee27a6 (patch)
treec09c9449b7cb83f4fc4739caad611529177474bb /addons/web_graph/static/src
parent47e028f6c94c82e50cac026a6a9e72df211fa8c9 (diff)
parent0074bc4b3d8b1fc9d80f7a76f8f5412818de4e7c (diff)
[MERGE]
bzr revid: hmo@tinyerp.com-20121112092513-ngonx9bv68uw2gb5
Diffstat (limited to 'addons/web_graph/static/src')
-rw-r--r--addons/web_graph/static/src/js/graph.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 8d8d49d0a44..3b73201b154 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -94,7 +94,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
if (self.legend == "top") { self.legend = "inside"; }
self.forcehtml = true;
- self.graph_get_data().then(function (result) {
+ self.graph_get_data().done(function (result) {
self.graph_render_all(result).download.saveImage('png');
}).always(function () {
self.forcehtml = false;
@@ -243,7 +243,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
var result = [];
var ticks = {};
- return obj.call("fields_view_get", [view_id, 'graph']).pipe(function(tmp) {
+ return obj.call("fields_view_get", [view_id, 'graph']).then(function(tmp) {
view_get = tmp;
fields = view_get['fields'];
var toload = _.select(group_by, function(x) { return fields[x] === undefined });
@@ -251,7 +251,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
return obj.call("fields_get", [toload, context]);
else
return $.when([]);
- }).pipe(function (fields_to_add) {
+ }).then(function (fields_to_add) {
_.extend(fields, fields_to_add);
var tree = $($.parseXML(view_get['arch']));
@@ -307,7 +307,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
}
if (mode === "pie") {
- return obj.call("read_group", [domain, yaxis.concat([xaxis[0]]), [xaxis[0]]], {context: context}).pipe(function(res) {
+ return obj.call("read_group", [domain, yaxis.concat([xaxis[0]]), [xaxis[0]]], {context: context}).then(function(res) {
_.each(res, function(record) {
result.push({
'data': [[_convert(xaxis[0], record[xaxis[0]]), record[yaxis[0]]]],
@@ -318,11 +318,11 @@ instance.web_graph.GraphView = instance.web.View.extend({
} else if ((! stacked) || (xaxis.length < 2)) {
var defs = [];
_.each(xaxis, function(x) {
- defs.push(obj.call("read_group", [domain, yaxis.concat([x]), [x]], {context: context}).pipe(function(res) {
+ defs.push(obj.call("read_group", [domain, yaxis.concat([x]), [x]], {context: context}).then(function(res) {
return [x, res];
}));
});
- return $.when.apply($, defs).pipe(function() {
+ return $.when.apply($, defs).then(function() {
_.each(_.toArray(arguments), function(res) {
var x = res[0];
res = res[1];
@@ -336,15 +336,15 @@ instance.web_graph.GraphView = instance.web.View.extend({
});
} else {
xaxis.reverse();
- return obj.call("read_group", [domain, yaxis.concat(xaxis.slice(0, 1)), xaxis.slice(0, 1)], {context: context}).pipe(function(axis) {
+ return obj.call("read_group", [domain, yaxis.concat(xaxis.slice(0, 1)), xaxis.slice(0, 1)], {context: context}).then(function(axis) {
var defs = [];
_.each(axis, function(x) {
var key = x[xaxis[0]]
- defs.push(obj.call("read_group", [domain, yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).pipe(function(res) {
+ defs.push(obj.call("read_group", [domain, yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).then(function(res) {
return [x, key, res];
}));
});
- return $.when.apply($, defs).pipe(function() {
+ return $.when.apply($, defs).then(function() {
_.each(_.toArray(arguments), function(res) {
var x = res[0];
var key = res[1];
@@ -359,7 +359,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
});
});
}
- }).pipe(function() {
+ }).then(function() {
var res = {
'data': result,
'ticks': _.map(ticks, function(el, key) { return [el, key] })
@@ -374,7 +374,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
_.extend(this, options.data);
return this.graph_get_data()
- .then(this.proxy('graph_render_all'));
+ .done(this.proxy('graph_render_all'));
},
graph_render_all: function (data) {