diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-18 11:48:52 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-18 11:57:54 +0100 |
commit | 4927e38eb8f108d4e910e691f593bca4992fb28f (patch) | |
tree | ff5edf2e113f950c60aa795a5787320fef75049f /www/js/views/home.js | |
parent | 8931b0f009a9cee182d83ddf84ce198d0cd7cd70 (diff) |
handle offline/online event and set flag to indicate current state, also set this on init
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r-- | www/js/views/home.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/www/js/views/home.js b/www/js/views/home.js index 383275e..dd908f0 100644 --- a/www/js/views/home.js +++ b/www/js/views/home.js @@ -23,9 +23,7 @@ }, afterDisplay: function() { - if ( navigator && navigator.connection && ( navigator.connection.type == Connection.NONE || - navigator.connection.type == Connection.UNKNOWN ) ) { - localStorage.offline = 1; + if ( FMS.isOffline ) { this.navigate( 'offline' ); } else if ( FMS.currentDraft && ( FMS.currentDraft.get('title') || FMS.currentDraft.get('lat') || |