aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/home.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-02-28 17:01:10 +0000
committerStruan Donald <struan@exo.org.uk>2013-02-28 17:01:10 +0000
commite481a7fd383e041cd6be4f262a4dcc40b3e5a744 (patch)
tree6abd5f1866a3b9b48ed18ed45c21e44cc05c5247 /www/js/views/home.js
parentdf7de48f2eb5c4c6699273392296f87af628ea51 (diff)
add in photo page and navigation to page
also used jquery mobile pageshow/hide events instead of our own
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r--www/js/views/home.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/www/js/views/home.js b/www/js/views/home.js
index e29534e..2fc07e6 100644
--- a/www/js/views/home.js
+++ b/www/js/views/home.js
@@ -5,6 +5,11 @@
tag: 'div',
id: 'front-page',
+ events: {
+ 'pagehide': 'destroy',
+ 'pageshow': 'afterDisplay'
+ },
+
afterRender: function() {
/*
if ( !can_geolocate && ( !navigator.network || !navigator.network.connection ) ) {
@@ -27,9 +32,9 @@
if ( navigator && navigator.network && ( navigator.network.connection.type == Connection.NONE ||
navigator.network.connection.type == Connection.UNKNOWN ) ) {
localStorage.offline = 1;
- FMS.router.navigate( 'no_connection' );
+ this.navigate( 'no_connection' );
} else {
- FMS.router.navigate( 'around', { trigger: true } );
+ this.navigate( 'around' );
}
}
})