sonata-project/SonataAdminBundle — pull request #1053 by mmucklo (2012-12-03 23:02:09+00:00)
Title: Follow on to pull request #1033 - update label on add, reorder elements on delete

Per ivan1986's comment on 1033, we need a way to reorder elements on delete. This fixes that problem.

https://github.com/sonata-project/SonataAdminBundle/pull/1033#issuecomment-10543565

Also this fixes the label on add, so that the label reflects the new element number.

It's unclear whether non-numeric attribute indexes are allowed (or even attribute indexes that are out of order on purpose), but as of the previous code, it seems to be designed for only numerically indexed attributes.