summaryrefslogtreecommitdiff
path: root/addons/base_graph/static/src/js/graph.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-06-17 11:07:46 +0200
committerXavier Morel <xmo@openerp.com>2011-06-17 11:07:46 +0200
commit3bbb11353a0bf03c12bc08a6f2832b386d852b15 (patch)
treef8a565112666f964f9b4cea2001564714290b3e2 /addons/base_graph/static/src/js/graph.js
parent691a6b48d25f6097b29b3509217f804a1a7487c5 (diff)
[FIX] non-instance should all be declared with 'var'
See doc for rationale bzr revid: xmo@openerp.com-20110617090746-z35n4jsdqvicoa9h
Diffstat (limited to 'addons/base_graph/static/src/js/graph.js')
-rw-r--r--addons/base_graph/static/src/js/graph.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/base_graph/static/src/js/graph.js b/addons/base_graph/static/src/js/graph.js
index 0c0f9deb629..e1805f2d07a 100644
--- a/addons/base_graph/static/src/js/graph.js
+++ b/addons/base_graph/static/src/js/graph.js
@@ -84,8 +84,8 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
this.$element.html(QWeb.render("GraphView", {"fields_view": this.fields_view, "chart": this.chart,'view_id': this.view_id}));
this.opration_fld = {};
if (result.length){
- for(res in result) {
- for(fld in result[res]) {
+ for(var res in result) {
+ for(var fld in result[res]) {
if (typeof result[res][fld] == 'object') {
result[res][fld] = result[res][fld][result[res][fld].length - 1];
}
@@ -101,7 +101,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
}
}
- for (i in result){
+ for (var i in result){
var gen_key = result[i][this.chart_info_fields]+"_"+result[i][this.group_field];
if (this.opration_fld[gen_key] == undefined){
var map_val = {}
@@ -182,7 +182,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
if (xystr[xystring] == undefined){
xyname = {};
xyname[self.chart_info_fields] = xystring;
- for (j in self.group_list){
+ for (var j in self.group_list){
xyname[self.group_list[j]] = 0.0001;
}
xyname[newkey] = result[i][self.operator_field];
@@ -207,7 +207,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
//for legend color
var grp_color = [];
- for (i in self.group_list){
+ for (var i in self.group_list){
var legend = {};
if (self.group_list[i] == "val"){
legend['text'] = self.fields[self.operator_field]['string']
@@ -381,4 +381,4 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
};
-// vim:et fdc=0 fdl=0: \ No newline at end of file
+// vim:et fdc=0 fdl=0: