aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/web/fixmystreet/around/display_location.html5
-rw-r--r--web/cobrands/fixmystreet/base.scss145
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js16
-rw-r--r--web/cobrands/fixmystreet/images/sprite.pngbin138226 -> 138129 bytes
-rw-r--r--web/cobrands/fixmystreet/layout.scss28
-rw-r--r--web/js/map-OpenLayers.js2
6 files changed, 131 insertions, 65 deletions
diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html
index db0a2d4c0..f955386e2 100755
--- a/templates/web/fixmystreet/around/display_location.html
+++ b/templates/web/fixmystreet/around/display_location.html
@@ -54,11 +54,10 @@
<a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a>
[% END %]
[% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %]
- |
[% IF c.req.params.all_pins %]
- <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide stale reports') %]</a>
+ <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old reports') %]</a>
[% ELSE %]
- <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Include stale reports') %]</a>
+ <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Include old reports') %]</a>
[% END %]
[% END %]
</p>
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index a581ea8b2..dbba6e69e 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -894,18 +894,110 @@ a:hover.button-left {
}
}
+// map stuff
#map_box{
+ @extend .full-width;
background: #333;
height: 10em;
- @extend .full-width;
margin-bottom: 1em;
overflow: hidden;
+ position: relative;
#map {
width:100%;
height:100%;
}
}
+// OpenLayers fix for navigation being top right
+.olControlPanZoom {
+ width:48px;
+ right: 1em !important;
+ top: 1em !important;
+ left: auto !important;
+}
+
+// Openlayers map controls (overrides)
+#OpenLayers\.Control\.PanZoom_6_panup,
+#OpenLayers\.Control\.PanZoom_6_pandown,
+#OpenLayers\.Control\.PanZoom_6_panleft,
+#OpenLayers\.Control\.PanZoom_6_panright,
+#OpenLayers\.Control\.PanZoom_6_zoomin,
+#OpenLayers\.Control\.PanZoom_6_zoomout {
+ text-indent:-999999px;
+ background:url(images/sprite.png) no-repeat;
+}
+#OpenLayers\.Control\.PanZoom_6_zoomworld {
+ display:none !important;
+ visibility:none !important;
+}
+
+#OpenLayers\.Control\.PanZoom_6_panup {
+ background-position:-25px -218px;
+ left:15px !important;
+ top:0 !important;
+}
+#OpenLayers\.Control\.PanZoom_6_pandown {
+ background-position:-25px -248px;
+ left:15px !important;
+ top:36px !important;
+}
+#OpenLayers\.Control\.PanZoom_6_panleft {
+ background-position:-10px -233px;
+ width:24px !important;
+ left:0px !important;
+ top:18px !important;
+}
+#OpenLayers\.Control\.PanZoom_6_panright {
+ background-position:-34px -233px;
+ width:24px !important;
+ left:24px !important;
+ top:18px !important;
+}
+#OpenLayers\.Control\.PanZoom_6_zoomin {
+ background-position:-25px -280px;
+ height:22px !important;
+ left:15px !important;
+ top:70px !important;
+}
+#OpenLayers\.Control\.PanZoom_6_zoomout {
+ background-position:-25px -298px;
+ height:22px !important;
+ left:15px !important;
+ top:92px !important;
+}
+
+//hide pins, show old reports etc
+#sub_map_links {
+ position: absolute;
+ left: 0;
+ right:0;
+ bottom: 0;
+ z-index: 1000;
+ background:#333;
+ margin:0;
+ a {
+ @include inline-block;
+ font-size:0.6875em;
+ color:#fff;
+ padding:0.6em 3em 0.5em 1em;
+ background:url(images/sprite.png) right -4066px no-repeat;
+ &#hide_pins_link {
+ background-position:right -3976px;
+ }
+ &#all_pins_link {
+ background-position:right -4022px;
+ }
+ &#map_permalink {
+ background-position:right -4070px;
+ }
+ }
+}
+
+//copyright attribution
+#OpenLayers\.Control\.Attribution_3 {
+ bottom:2em !important;
+}
+
/* Drag is only present in noscript form. XXX Copy from core. */
#drag {
input, img {
@@ -1181,55 +1273,4 @@ ul.breadcrumb {
border-bottom:none;
margin-bottom:0;
}
-}
-
-
-// openlayers overrides
-#OpenLayers\.Control\.PanZoom_6_panup,
-#OpenLayers\.Control\.PanZoom_6_pandown,
-#OpenLayers\.Control\.PanZoom_6_panleft,
-#OpenLayers\.Control\.PanZoom_6_panright,
-#OpenLayers\.Control\.PanZoom_6_zoomin,
-#OpenLayers\.Control\.PanZoom_6_zoomout {
- text-indent:-999999px;
- background:url(images/sprite.png) no-repeat;
-}
-#OpenLayers\.Control\.PanZoom_6_zoomworld {
- display:none !important;
- visibility:none !important;
-}
-
-#OpenLayers\.Control\.PanZoom_6_panup {
- background-position:-25px -218px;
- left:15px !important;
- top:0 !important;
-}
-#OpenLayers\.Control\.PanZoom_6_pandown {
- background-position:-25px -248px;
- left:15px !important;
- top:36px !important;
-}
-#OpenLayers\.Control\.PanZoom_6_panleft {
- background-position:-10px -233px;
- width:24px !important;
- left:0px !important;
- top:18px !important;
-}
-#OpenLayers\.Control\.PanZoom_6_panright {
- background-position:-34px -233px;
- width:24px !important;
- left:24px !important;
- top:18px !important;
-}
-#OpenLayers\.Control\.PanZoom_6_zoomin {
- background-position:-25px -280px;
- height:22px !important;
- left:15px !important;
- top:70px !important;
-}
-#OpenLayers\.Control\.PanZoom_6_zoomout {
- background-position:-25px -298px;
- height:22px !important;
- left:15px !important;
- top:92px !important;
} \ No newline at end of file
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index fa46656e9..9c390b1da 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -327,4 +327,18 @@ $(function(){
});
// $('.mobile .nicetable tr.heading > td.title').css({'min-width':'300px'});
// $('.mobile .nicetable tr > td.data').css({'max-width':'12%'});
-});
+
+ /*
+ * Map controls prettiness
+ */
+ //add links container (if its not there)
+ if($('#sub_map_links').length === 0){
+ $('<p id="sub_map_links" />').insertAfter($('#map'));
+ }
+
+ //add permalink
+ $('#sub_map_links').append('<a href="#" id="map_permalink">Permalink</a>');
+
+ //open/close toggle button on desk
+ $('#sub_map_links').prepend('<span id="map_links_toggle">&nbsp;</span>');
+}); \ No newline at end of file
diff --git a/web/cobrands/fixmystreet/images/sprite.png b/web/cobrands/fixmystreet/images/sprite.png
index 2abfa1279..aff028314 100644
--- a/web/cobrands/fixmystreet/images/sprite.png
+++ b/web/cobrands/fixmystreet/images/sprite.png
Binary files differ
diff --git a/web/cobrands/fixmystreet/layout.scss b/web/cobrands/fixmystreet/layout.scss
index 1e6fce779..139540ac7 100644
--- a/web/cobrands/fixmystreet/layout.scss
+++ b/web/cobrands/fixmystreet/layout.scss
@@ -2,14 +2,6 @@
@import "_colours";
@import "_mixins";
-// OpenLayers fix for navigation being top right
-.olControlPanZoom {
- width:48px;
- right: 1em !important;
- top: 5em !important;
- left: auto !important;
-}
-
//hacks for desk/mob only stuff
.desk-only {
display:block !important;
@@ -448,6 +440,26 @@ body.twothirdswidthpage {
z-index:1;
}
+// Pull OpenLayers navigation down a bit
+.olControlPanZoom {
+ top: 5em !important;
+}
+
+#sub_map_links {
+ left:auto;
+ bottom:auto;
+ top:14em;
+ #map_links_toggle {
+ display:block;
+ position:absolute;
+ left:-1em;
+ background:#000;
+ width:1em;
+ height:100%;
+ @include border-radius(0.25em 0 0 0.25em);
+ }
+}
+
// log in bit, pokes above the .content div
#user-meta{
display:block;
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 4a5e8ed54..74b44c314 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -183,7 +183,7 @@ function fixmystreet_onload() {
$(function(){
- var perm = new OpenLayers.Control.Permalink();
+ var perm = new OpenLayers.Control.Permalink('map_permalink');
set_map_config(perm);
fixmystreet.map = new OpenLayers.Map("map", {