diff options
author | Dave Arter <davea@mysociety.org> | 2017-06-13 13:33:29 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-12-01 14:47:13 +0000 |
commit | c3214d95c633d63a93c67bba4879396bee465a99 (patch) | |
tree | 6afbba2134ea055f0d669f8fc7dab593b5a7b2cc /www/js | |
parent | 79e164a33e627c23269a6ae8bde5c062bd0085b6 (diff) |
Add HELP_DISABLED config key to remove help button from UI
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/app.js | 8 | ||||
-rw-r--r-- | www/js/config.js-example | 7 | ||||
-rw-r--r-- | www/js/views/around.js | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/www/js/app.js b/www/js/app.js index 9e8ced1..61ee590 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -340,7 +340,9 @@ var tpl = { FMS.checkOnlineStatus(); FMS.loadCurrentDraft(); FMS.checkLoggedInStatus(); - FMS.setupHelp(); + if (!CONFIG.HELP_DISABLED) { + FMS.setupHelp(); + } Backbone.history.start(); if ( navigator && navigator.splashscreen ) { @@ -348,7 +350,9 @@ var tpl = { } else { $('#load-screen').hide(); } - $('#display-help').show(); + if (!CONFIG.HELP_DISABLED) { + $('#display-help').show(); + } }); } }); diff --git a/www/js/config.js-example b/www/js/config.js-example index 2fceda7..2e8017b 100644 --- a/www/js/config.js-example +++ b/www/js/config.js-example @@ -43,7 +43,12 @@ var CONFIG = { image_svg: 'images/pin.svg', background_svg: 'images/pin_shadow.svg' } - } + }, + + // Set this to true if you want to disable the help button on the right hand + // side of the screen. NB you'll also need to hide #display-help and #help + // elements in your CSS. + HELP_DISABLED: false }; diff --git a/www/js/views/around.js b/www/js/views/around.js index cb304ee..bafc65d 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -197,7 +197,7 @@ }, displayHelpIfFirstTime: function() { - if ( !FMS.usedBefore ) { + if ( !FMS.usedBefore && !CONFIG.HELP_DISABLED ) { FMS.helpShow(); } }, |