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:
parent
399a3a1ff6
commit
14aed9a1de
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue