From 4edeca79b617e5da842368328c44d97f21a8a60d Mon Sep 17 00:00:00 2001 From: "mikeshoup@gmail.com" Date: Fri, 17 Dec 2010 21:45:43 +0000 Subject: [PATCH] Added error dialogs for AJAX and GPS failures. --- share-a-bike/app/assistants/main-assistant.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share-a-bike/app/assistants/main-assistant.js b/share-a-bike/app/assistants/main-assistant.js index be9be65..7b85307 100644 --- a/share-a-bike/app/assistants/main-assistant.js +++ b/share-a-bike/app/assistants/main-assistant.js @@ -43,6 +43,7 @@ MainAssistant.prototype = { var onGpsFailure = function(result) { // Failure in GPS + Mojo.Controller.errorDialog("Error while retrieving GPS data."); this.showSpinner(false); }; @@ -54,9 +55,11 @@ MainAssistant.prototype = { }.bind(this); onAjaxFailure = function(transport) { - // There has been a failure, stop spinning + // Ajax failure this.showSpinner(false); - }; + Mojo.Controller.errorDialog("Error while retrieving data from BCycle's API."); + + }.bind(this); // Get GPS Coord this.getGpsCoord(onGpsSuccess, onGpsFailure);