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
2f16574174
commit
4edeca79b6
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue