aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-14 10:34:20 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-14 10:34:20 +0100
commit3fb91edf5cd0711e4102d2ebaeff73db797afe0d (patch)
tree8f8aeaec1058bca58a0f9d82196e1082b9f06f4c
parent2da52b3280bc564c684599bdfe54d7eaedacf1ac (diff)
move help content to a template
Rather than hard coding it into index.html. Loaded by the help init code
-rw-r--r--src/index.html60
-rw-r--r--src/js/app.js5
2 files changed, 4 insertions, 61 deletions
diff --git a/src/index.html b/src/index.html
index c2adf68..5996a49 100644
--- a/src/index.html
+++ b/src/index.html
@@ -87,66 +87,6 @@
<div class="radar"></div>
</div>
<div id="help">
- <h1>Frequently Asked Questions</h1>
- <dl>
- <dt>What is FixMyStreet?</dt>
- <dd>FixMyStreet is a website to help people report, view,
-or discuss local problems they&rsquo;ve found to their local council by
-simply locating them on a map. It launched in early February
-2007.</dd>
- <dt>How do I use this app?</dt>
- <dd>The app will either locate you automatically or you can enter a postcode or location. You
- will see a map of that area on which you can view problems already reported in that area. To
-start reporting a problem scroll the map till the crosshair is over the location of the problem and
-press 'Report a problem here'.</dd>
-
- <dt>What happens to the information I enter?</dt>
- <dd><strong>All the information you enter will be sent to the council</strong>.
- The title, category and details of your report will be displayed on the website. By default
- your name will also be displayed on the website but you can choose to have this hidden.
- We will <strong>never display your email or phone number on the site</strong>.</dd>
-
- <dt>What if I want to remain anonymous?</dt>
- <dd>You can opt not to have you name displayed on the website when entering your details.
- <strong>Your name, email and phone number, if you provided it, will always be sent to the council.</strong></dd>
-
- <dt>What if I've included personal information in a report</dt>
- <dd>To have a report edited email <a href="mailto:support@fixmystreet.com">support@fixmystreet.com</a> with
- details of the report.</dd>
-
- <dt>What sort of problems should I report with FixMyStreet?</dt>
- <dd>FixMyStreet is primarily for reporting things which are
-<strong>broken or dirty or damaged or dumped, and need fixing, cleaning
-or clearing</strong>.</dd>
-
- <dt>What isn&rsquo;t FixMyStreet for?</dt>
- <dd>FixMyStreet is not a way of getting in touch with your council for all
- issues &ndash; please use FixMyStreet only for problems such as the above. We
- often route problem reports via cleansing services or highways and so using
- FixMyStreet for other matters may result in a delay in your report getting
- to the right department.</dd>
-
- <dt>Is it free?</dt>
- <dd>The site and app are free to use, yes. FixMyStreet is run
-by a registered charity, though, so if you want to make a contribution, <a
-onclick="FMS.openExternal(event); return false;" href="https://secure.mysociety.org/donate/">please do</a>.
- For more information see the <a onclick="FMS.openExternal(event); return false;" href="http://www.fixmystreet.com/faq/">website</a>.
- </dd>
-
- <dt>Who built FixMyStreet?</dt>
- <dd>The site and this app was built by <a onclick="FMS.openExternal(event); return false;" href="http://www.mysociety.org/">mySociety</a>.</dd>
- <dt>Thanks to...</dt>
- <dd>
-<a onclick="FMS.openExternal(event); return false;" href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps,
-UK postcodes, and UK addresses &ndash; data &copy; Crown copyright, all
-rights reserved, Ministry of Justice 100037819&nbsp;2008), the entire free software
-community (this particular project was brought to you by Phonegap, Backbone, jQuery mobile
-and the number 161.290) and <a
-onclick="FMS.openExternal(event); return false;" href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all
-our servers).
-
-Let us know if we&rsquo;ve missed anyone.</dd>
- </dl>
</div>
<div id="dismiss">&gt;</div>
<div id="display-help">
diff --git a/src/js/app.js b/src/js/app.js
index 74db8fe..539ad43 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -38,7 +38,7 @@ var tpl = {
(function (FMS, Backbone, _, $) {
_.extend(FMS, {
templates: [
- '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'
+ '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'
],
usedBefore: 0,
@@ -148,6 +148,9 @@ var tpl = {
viewHeight = $(window).height(),
helpHeight = viewHeight;
+ var template = _.template( tpl.get('help') );
+ help.html(template());
+
console.log( 'viewheight: ' + viewHeight );
console.log( 'top: ' + top );