[IMP] use .children(selector) rather than .find('> ' + selector)
bzr revid: xmo@openerp.com-20111004155918-c2vy0rwkesvdkmli
This commit is contained in:
parent
49de0f4640
commit
318ec9998b
|
@ -816,7 +816,7 @@ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.Lis
|
|||
|
||||
var row = cells.join('');
|
||||
this.$current
|
||||
.find('> tr:not([data-id])').remove().end()
|
||||
.children('tr:not([data-id])').remove().end()
|
||||
.append(new Array(count - this.records.length + 1).join(row));
|
||||
this.refresh_zebra(this.records.length);
|
||||
},
|
||||
|
|
|
@ -175,14 +175,14 @@ openerp.web.list_editable = function (openerp) {
|
|||
if (row) {
|
||||
$new_row.replaceAll(row);
|
||||
} else if (self.options.editable) {
|
||||
var $last_child = self.$current.find('> tr:last');
|
||||
var $last_child = self.$current.children('tr:last');
|
||||
if (self.records.length) {
|
||||
if (self.options.editable === 'top') {
|
||||
$new_row.insertBefore(
|
||||
self.$current.find('> [data-id]:first'));
|
||||
self.$current.children('[data-id]:first'));
|
||||
} else {
|
||||
$new_row.insertAfter(
|
||||
self.$current.find('> [data-id]:last'));
|
||||
self.$current.children('[data-id]:last'));
|
||||
}
|
||||
} else {
|
||||
$new_row.prependTo(self.$current);
|
||||
|
|
Loading…
Reference in New Issue