aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/home.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r--www/js/views/home.js31
1 files changed, 30 insertions, 1 deletions
diff --git a/www/js/views/home.js b/www/js/views/home.js
index 644754d..cfa6167 100644
--- a/www/js/views/home.js
+++ b/www/js/views/home.js
@@ -3,7 +3,36 @@
HomeView: FMS.FMSView.extend({
template: 'home',
tag: 'div',
- id: 'front-page'
+ id: 'front-page',
+
+ afterRender: function() {
+ /*
+ if ( !can_geolocate && ( !navigator.network || !navigator.network.connection ) ) {
+ geocheck_count++;
+ window.setTimeout( decide_front_page, 1000 );
+ return;
+ }
+
+ // sometime onDeviceReady does not fire so set this here to be sure
+ can_geolocate = true;
+
+ geocheck_count = 0;
+ */
+
+ $('#locating').show();
+
+ },
+
+ afterDisplay: function() {
+ if ( navigator && navigator.network && ( navigator.network.connection.type == Connection.NONE ||
+ navigator.network.connection.type == Connection.UNKNOWN ) ) {
+ localStorage.offline = 1;
+ FMS.router.navigate( 'no_connection' );
+ } else {
+ alert('pause');
+ FMS.router.navigate( 'around', { trigger: true } );
+ }
+ }
})
});
})(FMS, Backbone, _, $);