diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-12 12:17:42 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-12 15:18:37 +0100 |
commit | 82e9a55192524f8f30725acb83e2a1c21a19f55f (patch) | |
tree | ccbed736871e7cecc99dc1826658b19d235fe8eb /www/js/views/home.js | |
parent | c9415aee71d3a6967de6cbb99d453c9a01c20025 (diff) |
if no internet connection then allow the user to create an offline
report with a title, details and a photo
Alter the checking for in progress reports not to require a location
as offline reports might not have one
Also add a holding page for a users reports
Diffstat (limited to 'www/js/views/home.js')
-rw-r--r-- | www/js/views/home.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/www/js/views/home.js b/www/js/views/home.js index 9c169a9..383275e 100644 --- a/www/js/views/home.js +++ b/www/js/views/home.js @@ -26,8 +26,11 @@ if ( navigator && navigator.connection && ( navigator.connection.type == Connection.NONE || navigator.connection.type == Connection.UNKNOWN ) ) { localStorage.offline = 1; - this.navigate( 'no_connection' ); - } else if ( FMS.currentDraft && FMS.currentDraft.get('lat') ) { + this.navigate( 'offline' ); + } else if ( FMS.currentDraft && ( + FMS.currentDraft.get('title') || FMS.currentDraft.get('lat') || + FMS.currentDraft.get('details') || FMS.currentDraft.get('file') ) + ) { this.navigate( 'existing' ); } else { this.navigate( 'around' ); |