aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-03-29 18:00:07 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-03-30 15:58:55 +0100
commitf4064c90d64b3a3ae6e168ff06c0202c4c1d7c50 (patch)
tree3d3da8f8426df7791d693ee6c2cbbf729fbad876 /web/js/fixmystreet.js
parente994554ec343239c4c5235338f5fd04046f247b8 (diff)
Switch list item heading from h4 to h3.
This stops the front page header nesting skipping a level.
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 312a3e294..07c1a1a6b 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -136,12 +136,12 @@ $(function(){
// Geolocation
if (geo_position_js.init()) {
- var link = '<a href="#LINK" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
- $('form[action="/alert/list"]').append(link.replace('LINK','alert/list'));
+ var link = '<a href="LINK" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
+ $('form[action="/alert/list"]').append(link.replace('LINK','/alert/list'));
if ($('body.frontpage').length) {
- $('#postcodeForm').after(link.replace('LINK','around'));
+ $('#postcodeForm').after(link.replace('LINK','/around'));
} else{
- $('#postcodeForm').append(link.replace('LINK','around'));
+ $('#postcodeForm').append(link.replace('LINK','/around'));
}
$('#geolocate_link').click(function(e) {
var $link = $(this);
@@ -157,8 +157,8 @@ $(function(){
$link.find('img').remove();
var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude;
- var page = $link.attr('href').substr(1);
- location.href = '/' + page + '?latitude=' + latitude + ';longitude=' + longitude;
+ var page = $link.attr('href');
+ location.href = page + '?latitude=' + latitude + ';longitude=' + longitude;
}, function(err) {
$link.find('img').remove();
if (err.code == 1) { // User said no