aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-14 17:46:08 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-14 17:46:08 +0100
commit9aa719c609437d79f9a530d06fac1ddc70b37934 (patch)
treebf89685fbe0e40ff217648c987b14e7645f23d1f
parent814d38406a40d0200199d707b90f04cabb6779dc (diff)
Refactor first time help showing code to a method
For the reduction of duplicate code
-rw-r--r--src/js/views/around.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/js/views/around.js b/src/js/views/around.js
index 38e235a..3bda9ca 100644
--- a/src/js/views/around.js
+++ b/src/js/views/around.js
@@ -110,8 +110,7 @@
fixmystreet.nav.activate();
if ( !FMS.usedBefore ) {
- FMS.helpShow();
- FMS.helpViewed();
+ this.displayFirstTimeHelp();
}
},
@@ -184,11 +183,15 @@
$('#front-howto').show();
if ( !FMS.usedBefore ) {
- FMS.helpShow();
- FMS.helpViewed();
+ this.displayFirstTimeHelp();
}
},
+ displayFirstTimeHelp: function() {
+ FMS.helpShow();
+ FMS.helpViewed();
+ },
+
displayButtons: function(isLocationSet) {
if ( fixmystreet.map ) {
fixmystreet.nav.activate();