Replace ok and err with .done and .fail in AJAX

Change-Id: Ida8657ee196c8fc06b972d21abfffc7208d75fed
Merge "Replace ok and err with .done and .fail in AJAX"