aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-10-25 14:33:55 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-10-25 18:45:37 +0100
commitefa9988fc9f989e18f28f8aa1c02fb5122d1277a (patch)
tree265bc13f9eb11771d395fb62337e0565c2bd6adb /web
parent5b1520f738a362b5c6a0def5b5d322a728df3951 (diff)
Tidy up panzoom bar placement.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/bromley/layout.scss2
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js6
-rw-r--r--web/cobrands/sass/_base.scss3
-rw-r--r--web/cobrands/sass/_layout.scss5
-rw-r--r--web/js/map-OpenLayers.js9
5 files changed, 13 insertions, 12 deletions
diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss
index 2dcc73cc4..b898f5791 100644
--- a/web/cobrands/bromley/layout.scss
+++ b/web/cobrands/bromley/layout.scss
@@ -113,7 +113,7 @@ body.frontpage {
right: 0;
}
-// Pull OpenLayers navigation down a bit
+// OpenLayers navigation always top right
#fms_pan_zoom {
top: 0.5em !important;
}
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index d4dfdf99f..b567981f1 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -89,11 +89,13 @@ $(function(){
height: 'auto',
margin: 0
});
- $('#fms_pan_zoom').css({ top: '2.75em !important' });
+ $('#fms_pan_zoom').css({ top: '2.75em' });
$('.big-green-banner')
.addClass('mobile-map-banner')
.appendTo('#map_box')
.html('<a href="/">' + translation_strings.home + '</a> ' + translation_strings.place_pin_on_map);
+ } else {
+ $('#fms_pan_zoom').css({ top: '0.5em' });
}
$('span.report-a-problem-btn').on('click.reportBtn', function(){
$('html, body').animate({scrollTop:0}, 500);
@@ -121,12 +123,12 @@ $(function(){
$('#site-header').show();
banner_text = translation_strings.report_problem_heading;
}
- $('#fms_pan_zoom').css({ top: '4.75em !important' });
$('.big-green-banner')
.removeClass('mobile-map-banner')
.prependTo('#side')
.html(banner_text);
}
+ $('#fms_pan_zoom').css({ top: '4.75em' });
$('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn');
}
last_type = type;
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index a7670b434..83a04ea6c 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -1018,11 +1018,10 @@ a:hover.button-left {
// Left and right so that zoom can be left, pan right.
#fms_pan_zoom {
right: 0.5em !important;
- top: 2.75em !important;
+ top: 0.5em;
left: 0.5em !important;
}
// The left and right of the above causes the navigation to move off-screen left in IE6.
-// XXX Need to check IE7
.ie6 #fms_pan_zoom {
left: auto !important;
}
diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss
index 7de9e0544..d4f45578d 100644
--- a/web/cobrands/sass/_layout.scss
+++ b/web/cobrands/sass/_layout.scss
@@ -477,11 +477,6 @@ body.twothirdswidthpage {
z-index:1;
}
-// Pull OpenLayers navigation down a bit
-#fms_pan_zoom {
- top: 4.75em !important;
-}
-
// push zoom back over to right
#fms_pan_zoom_zoomin {
left:auto !important;
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index a69b22799..f7a46ee68 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -273,8 +273,13 @@ $(function(){
}, fixmystreet.map_options)
);
- if ($('html').hasClass('mobile') && fixmystreet.page == 'around') {
- $('#fms_pan_zoom').css({ top: '2.75em !important' });
+ // Need to do this here, after the map is created
+ if ($('html').hasClass('mobile')) {
+ if (fixmystreet.page == 'around') {
+ $('#fms_pan_zoom').css({ top: '2.75em' });
+ }
+ } else {
+ $('#fms_pan_zoom').css({ top: '4.75em' });
}
// Set it up our way