aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/home.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-02-28 11:07:48 +0000
committerStruan Donald <struan@exo.org.uk>2013-02-28 11:07:48 +0000
commit2ac9ca08ebc95fddb75b39813d7ed85f09bb92f3 (patch)
tree3479e9871324f24c1d09b0bddf2dd7470998b784 /www/js/views/home.js
parent24fcbd330f20725252a803efaa0631130b965028 (diff)
WIP around page display
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, _, $);