diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/app.js | 10 | ||||
-rw-r--r-- | src/js/views/around.js | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/js/app.js b/src/js/app.js index 596b6ff..419b46a 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -41,6 +41,7 @@ var tpl = { 'home', 'around', 'offline', 'save_offline', 'reports', 'login', 'address_search', 'existing', 'photo', 'details', 'details_extra', 'submit', 'submit_email', 'submit_name', 'submit_set_password', 'submit_password', 'submit_confirm', 'sent' ], + usedBefore: 0, isLoggedIn: 0, isOffline: 0, initialized: 0, @@ -176,6 +177,11 @@ var tpl = { help.animate({left: viewWidth}, 400, 'swing', function() { $('#display-help').show(); } ); }, + helpViewed: function() { + FMS.usedBefore = 1; + localStorage.usedBefore = 1; + }, + initialize: function () { if ( this.initialized == 1 ) { return this; @@ -212,6 +218,10 @@ var tpl = { FMS.currentUser = new FMS.User({id: 1}); } + if ( localStorage.usedBefore ) { + FMS.usedBefore = 1; + } + document.addEventListener('pause', function() { FMS.locator.stopTracking(); FMS.saveCurrentDraft(); }, false); document.addEventListener('resume', onResume, false); document.addEventListener('backbutton', function(e) { FMS.router.back(e); }, true); diff --git a/src/js/views/around.js b/src/js/views/around.js index 70b6a02..38e235a 100644 --- a/src/js/views/around.js +++ b/src/js/views/around.js @@ -108,6 +108,11 @@ fixmystreet.select_feature.deactivate(); fixmystreet.select_feature.activate(); fixmystreet.nav.activate(); + + if ( !FMS.usedBefore ) { + FMS.helpShow(); + FMS.helpViewed(); + } }, positionUpdate: function( info ) { @@ -177,6 +182,11 @@ } $('#front-howto').html('<p>' + msg + '</msg>'); $('#front-howto').show(); + + if ( !FMS.usedBefore ) { + FMS.helpShow(); + FMS.helpViewed(); + } }, displayButtons: function(isLocationSet) { |