aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-21 12:31:17 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-21 12:31:17 +0000
commite2bf144a6aaa19779fc55a04081a3c269b9d0f81 (patch)
tree00318d801d35948938743608252fccd2d1b4e585 /web
parenteb0c0d42f3596c5dc21e9bcdcc02a4008a541c34 (diff)
parentf8a8948ddb790e7e7593d538c55a3a278fbf3973 (diff)
Merge remote branch 'origin/zurich'
(locale ignored, will rerun .po extraction after to get all changes.) Conflicts: locale/FixMyStreet.po locale/cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nn_NO.UTF-8/LC_MESSAGES/FixMyStreet.po templates/web/fixmystreet/report/banner.html templates/web/zurich/faq/faq-de-ch.html
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/_base.scss12
-rw-r--r--web/cobrands/fixmystreet/images/spinner-white.gifbin0 -> 2646 bytes
-rw-r--r--web/cobrands/zurich/_zurich.scss9
-rw-r--r--web/cobrands/zurich/base.scss25
-rw-r--r--web/cobrands/zurich/layout.scss91
-rw-r--r--web/cobrands/zurich/mapbg-1024.jpgbin0 -> 134052 bytes
-rw-r--r--web/cobrands/zurich/mapbg-1600.jpgbin0 -> 244838 bytes
-rw-r--r--web/i/pin-green-big.pngbin0 -> 3270 bytes
-rw-r--r--web/i/pin-red-big.pngbin0 -> 3401 bytes
-rw-r--r--web/js/fixmystreet.js7
-rw-r--r--web/js/map-OpenLayers.js14
-rw-r--r--web/js/map-wmts-zurich.js42
12 files changed, 172 insertions, 28 deletions
diff --git a/web/cobrands/fixmystreet/_base.scss b/web/cobrands/fixmystreet/_base.scss
index d72910450..724185be9 100644
--- a/web/cobrands/fixmystreet/_base.scss
+++ b/web/cobrands/fixmystreet/_base.scss
@@ -258,7 +258,6 @@ fieldset {
input[type=text],
input[type=password],
input[type=email],
-input[type=file],
textarea {
@include box-sizing(border-box);
width: 100%;
@@ -269,7 +268,6 @@ textarea {
input[type=text],
input[type=password],
input[type=email],
- input[type=file],
textarea {
max-width: 95%;
}
@@ -295,17 +293,13 @@ textarea {
input[type=text],
input[type=password],
-input[type=email],
-input[type=file] {
+input[type=email] {
border: 0.125em solid #888888;
@include border-radius(0.25em);
display: block;
font-size: 1em;
line-height: 1em;
}
-input[type=file] {
- margin-bottom:1em;
-}
label{
display: block;
@@ -1020,7 +1014,7 @@ a:hover.button-left {
// Left and right so that zoom can be left, pan right.
#fms_pan_zoom {
right: 0.5em !important;
- top: 0.5em !important;
+ top: 2.75em !important;
left: 0.5em !important;
}
// The left and right of the above causes the navigation to move off-screen left in IE6.
@@ -1409,9 +1403,7 @@ table.nicetable {
background: $primary;
padding-left:0.5em;
padding-right:0.5em;
- color:#1a1a1a;
&:hover {
- color:#1a1a1a;
text-decoration:none;
background:$primary/1.1;
}
diff --git a/web/cobrands/fixmystreet/images/spinner-white.gif b/web/cobrands/fixmystreet/images/spinner-white.gif
new file mode 100644
index 000000000..7db88b06b
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/spinner-white.gif
Binary files differ
diff --git a/web/cobrands/zurich/_zurich.scss b/web/cobrands/zurich/_zurich.scss
index b71670a92..cfc89e88e 100644
--- a/web/cobrands/zurich/_zurich.scss
+++ b/web/cobrands/zurich/_zurich.scss
@@ -8,9 +8,14 @@ a:hover {
text-decoration: underline;
}
+// mySociety addition for box shadow on front page with static image
+body.frontpage #zurich-footer-wrapper {
+ padding: 1px 0;
+ @include box-shadow(0 0 6px 1px #000);
+}
+
#zurich-footer {
- margin-top: 2em; // mySociety
- margin-left: 12px; // mySociety
+ margin: 2em auto; // mySociety
font-size: 67.5%;
line-height: 1.5em;
clear: both;
diff --git a/web/cobrands/zurich/base.scss b/web/cobrands/zurich/base.scss
index 8111f2726..c3246a1b1 100644
--- a/web/cobrands/zurich/base.scss
+++ b/web/cobrands/zurich/base.scss
@@ -51,7 +51,7 @@
#site-logo {
background: url(logo_portal.jpg) 0px -24px no-repeat;
width: 200px;
- height:44px;
+ height: 48px;
left:0;
top:4px;
}
@@ -66,6 +66,22 @@
background-color: $mobile_header_blue;
}
+// fix here:
+// a percentage width on input#pc breaks iPhone landscape/portrait switching
+// and the other changes make this fix pretty
+
+#front-main #postcodeForm div {
+ background: inherit;
+ border-color:transparent;
+ input#pc {
+ max-width: 15em;
+ background-color: #fff;
+ }
+ input#sub {
+ width: 3em;
+ }
+}
+
// No grey background or other bits
// The amount of resetting here shows this needs refactoring, so that it is FMS making the changes
// Also look into why full-width pulls things out, but then it is its children
@@ -106,3 +122,10 @@ h4.static-with-rule {
padding-left: 0.8em;
padding-right: 0.8em;
}
+
+#fms_pan_zoom_panup,
+#fms_pan_zoom_pandown,
+#fms_pan_zoom_panleft,
+#fms_pan_zoom_panright {
+ display: none;
+}
diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss
index 3a2d8ddb0..46ea45856 100644
--- a/web/cobrands/zurich/layout.scss
+++ b/web/cobrands/zurich/layout.scss
@@ -19,12 +19,12 @@ body {
border: none;
}
}
-// Except on map pages
-body.mappage .content {
+// Except on map pages (which includes the front page)
+body.mappage .content, body.frontpage .content {
@include box-shadow(0 0 6px 1px #000);
}
.ie6, .ie7, .ie8 {
- body.mappage .content {
+ body.mappage .content, body.frontpage .content {
border: 1px solid #666;
}
}
@@ -45,20 +45,53 @@ body.mappage.admin .nav-wrapper-2 {
body.frontpage #site-logo, #site-logo {
width: 415px;
- height: 16px;
+ height: 83px;
background: url(logo_portal.jpg) top left no-repeat;
top: 0;
- text-indent: 0;
- padding-left: 10px;
+ left: auto; // base set this to 0
+}
+
+// Static map on front page
+body.frontpage {
+ .table-cell {
+ background-position: 50% 117px;
+ background-repeat: no-repeat;
+ background-image: url(mapbg-1024.jpg);
+ @media all and (min-width: 1025px) {
+ background-image: url(mapbg-1600.jpg);
+ }
+ .content {
+ margin: 2em auto; // Spacing around front content on top of static map
+ }
+ }
+
+ #site-header {
+ height: 117px;
+ background-color: #fff;
+ @include box-shadow(0 0 6px 1px #000);
+ }
+}
+
+#site-logo-text {
+ position: absolute;
+ top: 0;
+ z-index: 3;
padding-top: 83px;
+ padding-left: 10px;
color: #585858;
font-size: 85%;
- left: auto; // base set this to 0
+}
+body.mappage #site-logo-text {
+ position: fixed;
}
.nav-wrapper {
.nav-wrapper-2 {
- border-top: solid 18px white;
+ border-top: none;
+ }
+ .nav-wrapper-3 {
+ height: 99px;
+ padding-top: 18px;
}
}
@@ -109,9 +142,14 @@ body.mappage {
background-color: inherit;
color: inherit;
margin: 0 0 2em 0;
+ #postcodeForm div {
+ border-color: $dark_blue;
+ input#pc {
+ max-width: none;
+ }
+ }
}
-/* TODO Change the main-nav to be what is wanted */
#main-nav {
ul#main-menu {
li {
@@ -160,6 +198,9 @@ body.mappage {
}
body.mappage {
+ #main-nav {
+ width: auto;
+ }
#main-nav ul#main-menu li a,
#main-nav ul#main-menu li span {
padding: 0.75em;
@@ -191,6 +232,10 @@ body.twothirdswidthpage {
background: $col_fixed_label;
@include background(linear-gradient(#769643, $col_fixed_label 4px));
}
+ &#closed {
+ padding-top: 2em;
+ background-image: none;
+ }
}
}
.ie6 .banner p {
@@ -200,7 +245,13 @@ body.twothirdswidthpage {
}
#fms_pan_zoom {
- top: 7.75em !important;
+ top: 9em !important;
+}
+#fms_pan_zoom_zoomin {
+ top: 0 !important;
+}
+#fms_pan_zoom_zoomout {
+ top: 44px !important;
}
// Admin specific changes
@@ -212,12 +263,24 @@ body.fullwidthpage.admin .content {
body.mappage.admin .content {
margin-top: 6em;
margin-left: 0.5em;
-
}
.admin {
.content {
margin: 2em 0 1em;
padding: 0 0 0 0;
+ ul.no-bullets {
+ margin-left: 0;
+ > li {
+ list-style: none;
+ }
+ }
+ li.assignation {
+ list-style: none;
+ }
+ .mock-label {
+ font-weight: bold;
+ padding-right: 0.333em;
+ }
}
#zurich-footer {
@@ -228,7 +291,8 @@ body.mappage.admin .content {
width: 100%;
font-size: 0.9em;
border: 1px solid $table_border_color;
- border-collapse:collapse;
+ border-collapse: collapse;
+ margin-bottom: 1em;
th, td {
padding: 0.666em 0.5em;
border: 1px solid $table_border_color;
@@ -239,6 +303,9 @@ body.mappage.admin .content {
border-bottom: 2px solid $table_heading_underline_col;
border-left: 1px solid $table_heading_border_col;
border-right: 1px solid $table_heading_border_col;
+ a:link, a:visited {
+ color: white;
+ }
}
td.record-id {
text-align: center;
diff --git a/web/cobrands/zurich/mapbg-1024.jpg b/web/cobrands/zurich/mapbg-1024.jpg
new file mode 100644
index 000000000..9adb82b98
--- /dev/null
+++ b/web/cobrands/zurich/mapbg-1024.jpg
Binary files differ
diff --git a/web/cobrands/zurich/mapbg-1600.jpg b/web/cobrands/zurich/mapbg-1600.jpg
new file mode 100644
index 000000000..9321bd612
--- /dev/null
+++ b/web/cobrands/zurich/mapbg-1600.jpg
Binary files differ
diff --git a/web/i/pin-green-big.png b/web/i/pin-green-big.png
new file mode 100644
index 000000000..16d73230a
--- /dev/null
+++ b/web/i/pin-green-big.png
Binary files differ
diff --git a/web/i/pin-red-big.png b/web/i/pin-red-big.png
new file mode 100644
index 000000000..2d970b9e2
--- /dev/null
+++ b/web/i/pin-red-big.png
Binary files differ
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index e25c2a571..838351e8b 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -52,7 +52,8 @@ $(function(){
var form_submitted = 0;
var submitted = false;
- $("form.validate").validate({
+ $("form.validate").each(function(){
+ $(this).validate({
rules: validation_rules,
messages: translation_strings,
onkeyup: false,
@@ -85,6 +86,7 @@ $(function(){
submitted = false;
},
invalidHandler: function(form, validator) { submitted = true; }
+ });
});
$('input[type=submit]').click( function(e) { form_submitted = 1; } );
@@ -142,7 +144,8 @@ $(function(){
if($('.mobile').length){
$link.append(' <img src="/cobrands/fixmystreet/images/spinner-black.gif" alt="" align="bottom">');
}else{
- $link.append(' <img src="/cobrands/fixmystreet/images/spinner-yellow.gif" alt="" align="bottom">');
+ var spincolor = $('<span>').css("color","white").css("color") === $('#front-main').css("background-color")? 'white' : 'yellow';
+ $link.append(' <img src="/cobrands/fixmystreet/images/spinner-' + spincolor + '.gif" alt="" align="bottom">');
}
geo_position_js.getCurrentPosition(function(pos) {
$link.find('img').remove();
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 88dc6d69e..e28a4d982 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -418,7 +418,19 @@ OpenLayers.Control.PermalinkFMS = OpenLayers.Class(OpenLayers.Control.Permalink,
href = href.substring( 0, href.indexOf(separator) );
}
- href += separator + OpenLayers.Util.getParameterString(this.createParams(null, this.map.getZoom()+fixmystreet.zoomOffset));
+ var center = this.map.getCenter();
+ if ( center && fixmystreet.state_map && fixmystreet.state_map == 'full' ) {
+ // Translate the permalink co-ords so that 'centre' is accurate
+ var $content = $('.content'), mb = $('#map_box'),
+ q = ( $content.offset().left - mb.offset().left + $content.width() ) / 2;
+ if (q < 0) { q = 0; }
+ var p = this.map.getViewPortPxFromLonLat(center);
+ p.x += q;
+ p.y += 25;
+ center = this.map.getLonLatFromViewPortPx(p);
+ }
+
+ href += separator + OpenLayers.Util.getParameterString(this.createParams(center, this.map.getZoom()+fixmystreet.zoomOffset));
// Could use mlat/mlon here as well if we are on a page with a marker
if (this.anchor && !this.element) {
window.location.href = href;
diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js
index 682c62f39..9fed68b8a 100644
--- a/web/js/map-wmts-zurich.js
+++ b/web/js/map-wmts-zurich.js
@@ -2,6 +2,34 @@
* Maps for FMZ using Zurich council's WMTS tile server
*/
+function fixmystreet_zurich_admin_drag() {
+ var admin_drag = new OpenLayers.Control.DragFeature( fixmystreet.markers, {
+ onComplete: function(feature, e) {
+ var lonlat = feature.geometry.clone();
+ lonlat.transform(
+ fixmystreet.map.getProjectionObject(),
+ new OpenLayers.Projection("EPSG:4326")
+ );
+ if (window.confirm( 'Richtiger Ort?' ) ) {
+ // Store new co-ordinates
+ document.getElementById('fixmystreet.latitude').value = lonlat.y;
+ document.getElementById('fixmystreet.longitude').value = lonlat.x;
+ } else {
+ // Put it back
+ var lat = document.getElementById('fixmystreet.latitude').value;
+ var lon = document.getElementById('fixmystreet.longitude').value;
+ lonlat = new OpenLayers.LonLat(lon, lat).transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ fixmystreet.markers.features[0].move(lonlat);
+ }
+ }
+ } );
+ fixmystreet.map.addControl( admin_drag );
+ admin_drag.activate();
+}
+
$(function(){
$('#map_layer_toggle').toggle(function(){
$(this).text('Luftbild');
@@ -10,6 +38,15 @@ $(function(){
$(this).text('Stadtplan');
fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]);
});
+
+ /* Admin dragging of pin */
+ if (fixmystreet.page == 'admin') {
+ if ($.browser.msie) {
+ $(window).load(fixmystreet_zurich_admin_drag);
+ } else {
+ fixmystreet_zurich_admin_drag();
+ }
+ }
});
/*
@@ -34,6 +71,11 @@ $(function(){
fixmystreet.controls.push( new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) );
}
+ /* Linking back to around from report page, keeping track of map moves */
+ if ( fixmystreet.page == 'report' ) {
+ fixmystreet.controls.push( new OpenLayers.Control.PermalinkFMS('key-tool-problems-nearby', '/around') );
+ }
+
fixmystreet.map_type = OpenLayers.Layer.WMTS;
// Set DPI - default is 72