[FIX] resequencing of rows during drag & drop
I don't even understand how it worked before as the terminal condition would really just blow up. Also, redisplay resequenced rows bzr revid: xmo@openerp.com-20110803113137-46ddhdail0d4m3ie
This commit is contained in:
@@ -1156,12 +1156,14 @@ openerp.base.ListView.Groups = openerp.base.Class.extend( /** @lends openerp.bas
|
||||
// if drag to 1st row (to = 0), start sequencing from 0
|
||||
// (exclusive lower bound)
|
||||
seq = to ? list.rows[to - 1].data.sequence.value : 0;
|
||||
while (++seq, data = list.rows[index++].data) {
|
||||
while (++seq, list.rows[index]) {
|
||||
data = list.rows[index].data;
|
||||
data.sequence.value = seq;
|
||||
// write are independent from one another, so we can just
|
||||
// launch them all at the same time and we don't really
|
||||
// give a fig about when they're done
|
||||
dataset.write(data.id.value, {sequence: seq});
|
||||
list.reload_record(index++);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user