[FIX] switch to form to consider that we're now in tbodies

bzr revid: xmo@openerp.com-20110407090900-v65h22bdq6m057y5
This commit is contained in:
Xavier Morel 2011-04-07 11:09:00 +02:00
parent 28befb8092
commit 51a7b673c5
1 changed files with 6 additions and 4 deletions

View File

@ -69,10 +69,12 @@ openerp.base.ListView = openerp.base.Controller.extend({
render_body();
},
on_select_row: function (event) {
// count number of preceding siblings to line clicked, that's the one
// we want (note: line 0 is title row, so remove 1 for actual row
// index)
var row = this.rows[$(event.currentTarget).prevAll().length - 1];
var $target = $(event.currentTarget);
if (!$target.parent().is('tbody')) {
return;
}
// count number of preceding siblings to line clicked
var row = this.rows[$target.prevAll().length];
var index = _.indexOf(this.dataset.ids, row.id);
if (index == undefined || index === -1) {