diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-29 12:39:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-29 12:39:11 +0100 |
commit | e0fb5314a6479698d6b60d8ea9206d2755a1a292 (patch) | |
tree | 9f6251bd85f780a96352b3077851608240143a9e | |
parent | 0b14905827f3615d33767b75a7aee317eb14ccdc (diff) |
Bromley map only on RHS.
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 1f4a73425..7b987c55e 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -103,17 +103,39 @@ $(function(){ } else { // Make map full screen on non-mobile sizes. $html.removeClass('mobile'); - var map_pos = 'fixed', map_height = '100%'; - if (cobrand == 'bromley' || $html.hasClass('ie6')) { - map_pos = 'absolute'; - map_height = $(window).height(); + if (cobrand == 'bromley') { + if ($html.hasClass('ie6')) { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'absolute', + right: 0, top: '4em',// left: $('.content').offset().left + $('.content').width(), + width: $(window).width() - $('.content').offset().left - $('.content').width() - 32, + height: $(window).height() - $('.content').offset().top + 32, + margin: 0 + }); + } else { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'fixed', + right: 0, top: $('.content').offset().top, bottom: 0,// left: $('.content').offset().left + $('.content').width(), + width: $(window).width() - $('.content').offset().left - $('.content').width() - 32, + height: $(window).height() - $('.content').offset().top, + margin: 0 + }); + } + } else if ($html.hasClass('ie6')) { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'absolute', + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: $(window).height(), + margin: 0 + }); + } else { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'fixed', + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: '100%', + margin: 0 + }); } - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: map_pos, - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: map_height, - margin: 0 - }); if (cobrand == 'bromley') { $('#bromley-footer').hide(); } |