diff options
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r-- | www/js/views/home.js | 9 |
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' ); } } }) |