aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/app.js20
-rw-r--r--src/js/views/around.js1
2 files changed, 13 insertions, 8 deletions
diff --git a/src/js/app.js b/src/js/app.js
index 43218c1..c79aa5a 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -38,7 +38,7 @@ var tpl = {
(function (FMS, Backbone, _, $) {
_.extend(FMS, {
templates: [
- 'home', 'help', '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'
+ 'home', 'help', 'initial_help', '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,
@@ -150,7 +150,12 @@ var tpl = {
viewHeight = $(window).height(),
helpHeight = viewHeight;
- var template = _.template( tpl.get('help') );
+ var template;
+ if ( !FMS.usedBefore ) {
+ template = _.template( tpl.get('initial_help') );
+ } else {
+ template = _.template( tpl.get('help') );
+ }
helpContent.html(template());
if ( !help.hasClass('android2') ) {
@@ -190,15 +195,16 @@ var tpl = {
if ( $('#help').hasClass('android2') ) {
$('#help').hide();
}
+ if ( !FMS.usedBefore ) {
+ var template = _.template( tpl.get('help') );
+ $('#helpContent').html(template());
+ FMS.usedBefore = 1;
+ localStorage.usedBefore = 1;
+ }
};
help.animate({left: viewWidth}, 400, 'swing', onHide );
},
- helpViewed: function() {
- FMS.usedBefore = 1;
- localStorage.usedBefore = 1;
- },
-
initialize: function () {
if ( this.initialized == 1 ) {
return this;
diff --git a/src/js/views/around.js b/src/js/views/around.js
index 4db5656..5f89883 100644
--- a/src/js/views/around.js
+++ b/src/js/views/around.js
@@ -186,7 +186,6 @@
displayHelpIfFirstTime: function() {
if ( !FMS.usedBefore ) {
FMS.helpShow();
- FMS.helpViewed();
}
},