ets-berkeley-edu/calcentral — pull request #2792 by redconfetti (2014-08-13 18:48:26+00:00)
Title: CLC-4000 - Applying event to 'Start Over' button in addition to '+ People' button

https://jira.ets.berkeley.edu/jira/browse/CLC-4000

Fixes bug with the Javascript modification to the 'Add People' popup window in Canvas. After the user submits the form, if there is an error, they can click on a 'Start Over' button which reloads the 'Add People' form view. This form view is refreshed to the original default content, not the modified content applied by our Javascript customization.

This updates the script to continually poll every 300 milliseconds for a 'Start Over' button that has not had the click event applied to it which modifies the help text. This is necessary because the 'Start Over' button is removed and added to the DOM dynamically, meaning new versions without the event applied are shown. Now they are caught and event is re-applied.