learning-unlimited/ESP-Website — pull request #195 by gkanwar (2011-12-05 07:27:20+00:00)
Title: AJAX scheduling silent failure fix

This should fix the silent failures on AJAX scheduling. I had to reorder how the assignment and unassignment events were processed slightly. In essence, the structure earlier was to call unassignment_request and assignment_request, which would then trigger unassignment and assignment respectively.

These two then had two listeners each, one of which dealt with sending the change to the server, and one of which actually made the change locally. If the server sending failed, it didn't prevent the local change from happening. So I made the server sending trigger the local changes only on success (or when nowriteback was true), and pop up an alert on failure.

Also, I had to upgrade jQuery to 1.7 instead of 1.3, because 1.3 didn't have the listeners for an error returned by an AJAX call, it only had a success listener.