1
0
Fork 0
mirror of https://github.com/shouptech/share-a-bike.git synced 2026-02-03 12:29:42 +00:00

Added error dialogs for AJAX and GPS failures.

This commit is contained in:
mikeshoup@gmail.com 2010-12-17 21:45:43 +00:00
parent 2f16574174
commit 4edeca79b6

View file

@ -43,6 +43,7 @@ MainAssistant.prototype = {
var onGpsFailure = function(result) { var onGpsFailure = function(result) {
// Failure in GPS // Failure in GPS
Mojo.Controller.errorDialog("Error while retrieving GPS data.");
this.showSpinner(false); this.showSpinner(false);
}; };
@ -54,9 +55,11 @@ MainAssistant.prototype = {
}.bind(this); }.bind(this);
onAjaxFailure = function(transport) { onAjaxFailure = function(transport) {
// There has been a failure, stop spinning // Ajax failure
this.showSpinner(false); this.showSpinner(false);
}; Mojo.Controller.errorDialog("Error while retrieving data from BCycle's API.");
}.bind(this);
// Get GPS Coord // Get GPS Coord
this.getGpsCoord(onGpsSuccess, onGpsFailure); this.getGpsCoord(onGpsSuccess, onGpsFailure);