summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/tree_view.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/views/tree_view.js')
-rw-r--r--addons/web/static/src/js/views/tree_view.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/addons/web/static/src/js/views/tree_view.js b/addons/web/static/src/js/views/tree_view.js
index 6246a1494f5..aeb206257fe 100644
--- a/addons/web/static/src/js/views/tree_view.js
+++ b/addons/web/static/src/js/views/tree_view.js
@@ -87,7 +87,7 @@ var TreeView = View.extend({
return;
}
- var $select = self.$el.find('select')
+ var $select = self.$('select')
.change(function () {
var $option = $(this).find(':selected');
self.getdata($option.val(), $option.data('children'));
@@ -155,8 +155,8 @@ var TreeView = View.extend({
children_ids = record[self.children_field];
_(children_ids).each(function(childid) {
- if (self.$el.find('[id=treerow_' + childid + '][data-row-parent-id='+ record_id +']').length ) {
- if (self.$el.find('[id=treerow_' + childid + '][data-row-parent-id='+ record_id +']').is(':hidden')) {
+ if (self.$('[id=treerow_' + childid + '][data-row-parent-id='+ record_id +']').length ) {
+ if (self.$('[id=treerow_' + childid + '][data-row-parent-id='+ record_id +']').is(':hidden')) {
is_loaded = -1;
} else {
is_loaded++;
@@ -164,7 +164,7 @@ var TreeView = View.extend({
}
});
if (is_loaded === 0) {
- if (!$this.parent().hasClass('oe_open')) {
+ if (!$this.parent().hasClass('o_open')) {
self.getdata(record_id, children_ids);
}
} else {
@@ -180,7 +180,7 @@ var TreeView = View.extend({
_(records).each(function (record) {
self.records[record.id] = record;
});
- var $curr_node = self.$el.find('#treerow_' + id);
+ var $curr_node = self.$('#treerow_' + id);
var children_rows = QWeb.render('TreeView.rows', {
'records': records,
'children_field': self.children_field,
@@ -192,10 +192,10 @@ var TreeView = View.extend({
'row_parent_id': id
});
if ($curr_node.length) {
- $curr_node.addClass('oe_open');
+ $curr_node.addClass('o_open');
$curr_node.after(children_rows);
} else {
- self.$el.find('tbody').html(children_rows);
+ self.$('tbody').html(children_rows);
}
});
},
@@ -229,11 +229,11 @@ var TreeView = View.extend({
// show & hide the contents
showcontent: function (curnode,record_id, show) {
- curnode.parent('tr').toggleClass('oe_open', show);
+ curnode.parent('tr').toggleClass('o_open', show);
_(this.records[record_id][this.children_field]).each(function (child_id) {
- var $child_row = this.$el.find('[id=treerow_' + child_id + '][data-row-parent-id='+ curnode.data('id') +']');
- if ($child_row.hasClass('oe_open')) {
- $child_row.toggleClass('oe_open',show);
+ var $child_row = this.$('[id=treerow_' + child_id + '][data-row-parent-id='+ curnode.data('id') +']');
+ if ($child_row.hasClass('o_open')) {
+ $child_row.toggleClass('o_open',show);
this.showcontent($child_row, child_id, false);
}
$child_row.toggle(show);