foodcoops/foodsoft — pull request #181 by JuliusR (2013-09-25 21:18:52+00:00)
Title: Fix minor delivery bug

# Reproduce bug
* delivery form
* click on the button for adding a `StockArticle` to the delivery
* abort the prompt for the quantity

As a result, the article is still included in the delivery but the button for adding is correctly reseted.

# Reason for the bug
It is caused by the timeout of the sort logic behind `updateSort`.

# Description of fix
Wait for the DOM update when adding the article to the delivery. If the prompt is aborted, do not append the article at all.

# Further issues addressed
I had to modify one migration in 53f24cd885169d4bb0adf2253257fdaabc3dd054. See also https://github.com/foodcoops/foodsoft/commit/2d549fc1daf85f81acb3c9b5a8d54bd13641d7db#commitcomment-4180684.