diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-07-11 16:58:16 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-07-11 16:58:16 +0200 |
| commit | df955d1dc8997c9bbef1648d8f34fde90c026584 (patch) | |
| tree | e1ed8700571a3dda14dd85bfa3597dc72a00d327 /addons/base_graph/static/src/js/graph.js | |
| parent | 417279b641ca416151219fa0210eb0ff4cfeff2c (diff) | |
[IMP] remove some intermediate variables crud in graph
bzr revid: xmo@openerp.com-20110711145816-lrk9y1iijcy6yptl
Diffstat (limited to 'addons/base_graph/static/src/js/graph.js')
| -rw-r--r-- | addons/base_graph/static/src/js/graph.js | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/addons/base_graph/static/src/js/graph.js b/addons/base_graph/static/src/js/graph.js index 1a6cf0be427..378e219d4c4 100644 --- a/addons/base_graph/static/src/js/graph.js +++ b/addons/base_graph/static/src/js/graph.js @@ -408,24 +408,23 @@ openerp.base_graph.GraphView = openerp.base.View.extend({ }); }, open_list_view : function (id){ - if($(".dhx_tooltip").is(":visible") == true) { + var self = this; + if($(".dhx_tooltip").is(":visible")) { $(".dhx_tooltip").remove('div'); } - var self = this; - id = id[self.chart_info_fields]; + id = id[this.chart_info_fields]; if (typeof id == 'object'){ id = id[0]; } - var self = this; var record_id = ""; - self.dataset.model = self.model; - if (typeof self.chart_info_fields == 'object'){ - record_id = self.chart_info_fields[0]; + this.dataset.model = this.model; + if (typeof this.chart_info_fields == 'object'){ + record_id = this.chart_info_fields[0]; }else{ - record_id = self.chart_info_fields; + record_id = this.chart_info_fields; } - self.dataset.domain = [[record_id, '=', id],['id','in',self.dataset.ids]]; + this.dataset.domain = [[record_id, '=', id],['id','in',this.dataset.ids]]; var modes = !!modes ? modes.split(",") : ["list", "form", "graph"]; var views = []; _.each(modes, function(mode) { @@ -435,18 +434,17 @@ openerp.base_graph.GraphView = openerp.base.View.extend({ } views.push(view); }); - var action = { - "res_model" : self.dataset.model, - "domain" : self.dataset.domain, + this.actionmanager = new openerp.base.ActionManager(this.session, "oe_app"); + this.actionmanager.start(); + this.actionmanager.do_action({ + "res_model" : this.dataset.model, + "domain" : this.dataset.domain, "views" : views, "type" : "ir.actions.act_window", "auto_search" : true, "view_type" : "list", "view_mode" : "list" - } - this.actionmanager = new openerp.base.ActionManager(this.session, "oe_app"); - this.actionmanager.start(); - this.actionmanager.do_action(action); + }); }, do_search: function(domains, contexts, groupbys) { @@ -472,4 +470,4 @@ openerp.base_graph.GraphView = openerp.base.View.extend({ }); // here you may tweak globals object, if any, and play with on_* or do_* callbacks on them }; -// vim:et fdc=0 fdl=0:
\ No newline at end of file +// vim:et fdc=0 fdl=0: |
