diff options
| author | Thibault Delavallée <tde@openerp.com> | 2012-06-28 14:26:49 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2012-06-28 14:26:49 +0200 |
| commit | db4fa6582ca84cda2147ded1e98dc22659bcb198 (patch) | |
| tree | e8a4451c466b49f77cee00f7a83dcceffe63f4bb /addons/web/static/src/js/view_tree.js | |
| parent | 48b08907c082164acc81cc770bc790e442a20f71 (diff) | |
| parent | 492af8bef457c63e93a952a75a9ba7bae647dc01 (diff) | |
[MERGE] Merged with trunk web.
bzr revid: tde@openerp.com-20120628105323-p50min2k8by55jg0
bzr revid: tde@openerp.com-20120628122649-affstbyq1mt80qnt
Diffstat (limited to 'addons/web/static/src/js/view_tree.js')
| -rw-r--r-- | addons/web/static/src/js/view_tree.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js index 9e938fe293a..e8bd7351f1f 100644 --- a/addons/web/static/src/js/view_tree.js +++ b/addons/web/static/src/js/view_tree.js @@ -84,6 +84,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie 'fields': this.fields, 'toolbar': has_toolbar })); + this.$element.addClass(this.fields_view.arch.attrs['class']); this.dataset.read_slice(this.fields_list()).then(function(records) { if (!has_toolbar) { @@ -179,7 +180,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie } }); if (is_loaded === 0) { - if (!$this.parent().hasClass('oe-open')) { + if (!$this.parent().hasClass('oe_open')) { self.getdata(record_id, children_ids); } } else { @@ -208,7 +209,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie }); if ($curr_node.length) { - $curr_node.addClass('oe-open'); + $curr_node.addClass('oe_open'); $curr_node.after(children_rows); } else { self.$element.find('tbody').html(children_rows); @@ -247,11 +248,11 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie // show & hide the contents showcontent: function (record_id, show) { this.$element.find('#treerow_' + record_id) - .toggleClass('oe-open', show); + .toggleClass('oe_open', show); _(this.records[record_id][this.children_field]).each(function (child_id) { var $child_row = this.$element.find('#treerow_' + child_id); - if ($child_row.hasClass('oe-open')) { + if ($child_row.hasClass('oe_open')) { this.showcontent(child_id, false); } $child_row.toggle(show); |
