~openerp-dev/openerp-web/7.0-opw-602138-acl

Viewing all changes in revision 4089.

  • Committer: Xavier Morel
  • Date: 2013-12-10 12:47:55 UTC
  • Revision ID: xmo@openerp.com-20131210124755-ugr3ehf744qoh1o5
[FIX] weird behavior when drag&dropping a row during edition in editable listview

When dropping, would simultanously stop the edition and try a write
(so 2 writes on the same record) and generally screw up the state of
all the things, ending up with an empty row and a weird (and
incorrect) warning.

This can be fixed by preventing resequencing during the creation or
edition of a record (row) inline.

For simplicity, implemented by looking up .ui-sortable descendants —
there are no utility methods for handling that and, aside from the
class, there's no good way to know if sortability was enabled on a
list body or not (as far as I can see, jquery-ui's sortable has no API
to query that) — and using jquery-ui's sortable API for enabling and
disabling sortable on the fly.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: