diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 18 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 10 |
2 files changed, 23 insertions, 5 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index c26b10d29..adb935708 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -1459,6 +1459,9 @@ fixmystreet.display = { height = $map_box.height(); $map_box.append( '<p class="sub-map-links" id="mob_sub_map_links">' + + '<a href="#" id="problems_nearby">' + + translation_strings.back + + '</a>' + '<a href="#" id="try_again">' + translation_strings.try_again + '</a>' + @@ -1471,25 +1474,32 @@ fixmystreet.display = { width: width, height: height }); - $('#try_again').click(function(e){ + + $('.mobile-map-banner span').text(translation_strings.right_place); + + $('#problems_nearby').click(function(e){ e.preventDefault(); history.back(); }); - $('.mobile-map-banner span').text(translation_strings.right_place); + $('#try_again').click(function(e) { + e.preventDefault(); + $('#mob_ok').click(); + }); // mobile user clicks 'ok' on map $('#mob_ok').toggle(function(){ //scroll the height of the map box instead of the offset //of the #side-form or whatever as we will probably want //to do this on other pages where #side-form might not be - $('html, body').animate({ scrollTop: height-60 }, 1000, function(){ + $('html, body').animate({ scrollTop: height-60 }, 500, function(){ $('html').removeClass('only-map'); $('#mob_sub_map_links').addClass('map_complete'); $('#mob_ok').text(translation_strings.map); }); }, function(){ - $('html, body').animate({ scrollTop: 0 }, 1000, function(){ + var current = $('html, body').scrollTop(); + $('html, body').animate({ scrollTop: 0 }, 500/height*current, function(){ $('html').addClass('only-map'); $('#mob_sub_map_links').removeClass('map_complete'); $('#mob_ok').text(translation_strings.ok); diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index bdd292e06..b52b75f43 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -1816,11 +1816,16 @@ html.js #map .noscript { } } + #problems_nearby, #try_again, #mob_ok { width: 50%; } + #try_again { + display: none; + } + .feed:after { @extend %sub-map-link-icon; background-position: -12px 0; @@ -1876,6 +1881,10 @@ html.js #map .noscript { top: 30px; background-color: rgba(#000, 0.3); + #problems_nearby { + display: none; + } + #try_again, #mob_ok { position: absolute; @@ -1935,7 +1944,6 @@ html.js #map .noscript { .map-fullscreen & { display: block; } - text-transform: uppercase; text-align: center; font-family: $heading-font; line-height: 1em; |