aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/app.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-19 15:46:14 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-19 15:46:14 +0100
commitb2a42c371daa083d8b4445b470cf569dc0bf329a (patch)
treec444dc37349cb196e7788d4d6eaa09a43866b315 /src/js/app.js
parent1bf1e9b9626efbc593beab043f302273a0d1a3c5 (diff)
Shorter intro help text
Fixes #100
Diffstat (limited to 'src/js/app.js')
-rw-r--r--src/js/app.js20
1 files changed, 13 insertions, 7 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;