aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-07-28 16:45:25 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-07-28 16:45:25 +0100
commitaaa1947c2ec5a45cfca0b01213464afcc10e4c9a (patch)
tree83f708393670602834a377dddbb0629dfa8bd9d6 /web
parent77a343a8d148abc4eb8922b645b25eefe0fae8c9 (diff)
parent9d00e9bc88bde0c604a30d7f72890768b13ee7f0 (diff)
Merge branch 'issues/968-refusing-councils'
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/base.scss76
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js13
-rw-r--r--web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow.pngbin0 -> 253 bytes
-rw-r--r--web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow@2.pngbin0 -> 332 bytes
-rw-r--r--web/cobrands/fixmystreet/layout.scss51
-rw-r--r--web/cobrands/sass/_base.scss17
-rw-r--r--web/js/map-OpenLayers.js10
7 files changed, 151 insertions, 16 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index 3baac2eb0..6e6cbd7b9 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -123,3 +123,79 @@
margin: 0.5em 0 1em 0;
}
}
+
+.unresponsive-council-warning {
+ margin: 1em -1em;
+ padding: 2em 2em;
+ background-color: mix(#fff, $primary, 70%);
+
+ h1 {
+ font-size: 1.4em;
+ }
+
+ p {
+ margin-bottom: 0.5em;
+ }
+
+ a {
+ display: inline-block;
+ margin-top: 0.5em;
+ padding: 0.5em 1em;
+ background-color: #000;
+ color: #fff;
+ border-radius: 0.3em;
+
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: mix(#000, $primary, 70%);
+ }
+ }
+}
+
+.unresponsive-council__header {
+ padding-bottom: 1em;
+ border-bottom: 1px solid #ccc;
+ margin-bottom: 1em;
+
+ p {
+ font-size: 1.2em;
+ margin-bottom: 0;
+ }
+}
+
+.unresponsive-council-cta {
+ display: block;
+ padding: 1em;
+ margin: 1em 0;
+ background-color: #555;
+ border-radius: 0.2em;
+ color: #fff;
+
+ &:visited {
+ color: #fff;
+ }
+
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: #777;
+ color: #fff;
+ }
+}
+
+.unresponsive-council-cta--primary {
+ background-color: $primary;
+ color: #000;
+
+ &:visited {
+ color: #000;
+ }
+
+ &:hover,
+ &:focus {
+ background-color: mix(#fff, $primary, 30%);
+ color: #000;
+ }
+}
+
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 31925e977..f5e6a8926 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -42,7 +42,7 @@ function tabs(elem, indirect) {
//toggle class on nav
$('.tab-nav .active').removeClass('active');
elem.addClass('active');
-
+
//hide / show the right tab
$('.tab.open').hide().removeClass('open');
$(target).show().addClass('open');
@@ -134,8 +134,8 @@ $(function(){
last_type = type;
}).resize();
- /*
- * Report a problem page
+ /*
+ * Report a problem page
*/
//desktop
if ($('#report-a-problem-sidebar').is(':visible')) {
@@ -178,10 +178,10 @@ $(function(){
//make initial tab active
$('.tab-nav a').first().addClass('active');
$('.tab').first().addClass('open');
-
+
//hide other tabs
$('.tab').not('.open').hide();
-
+
//set up click event
$(".tab-nav").on('click', 'a', function(e){
e.preventDefault();
@@ -306,7 +306,7 @@ $.fn.drawer = function(id, ajax) {
$('.spinner').remove();
});
}
-
+
// Tall drawer - put after .content for scrolling to work okay.
// position over the top of the main .content in precisely the right location
d.insertAfter($content).addClass('content').css({
@@ -486,4 +486,3 @@ $(window).load(function(){
}, 0);
});
*/
-
diff --git a/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow.png b/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow.png
new file mode 100644
index 000000000..664721830
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow.png
Binary files differ
diff --git a/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow@2.png b/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow@2.png
new file mode 100644
index 000000000..181d8402b
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/unresponsive-council-cta-arrow@2.png
Binary files differ
diff --git a/web/cobrands/fixmystreet/layout.scss b/web/cobrands/fixmystreet/layout.scss
index 009ab5bcb..1d56e675c 100644
--- a/web/cobrands/fixmystreet/layout.scss
+++ b/web/cobrands/fixmystreet/layout.scss
@@ -301,3 +301,54 @@ body.alertindex {
}
}
}
+
+body.unresponsive-council {
+ .container .content {
+ padding: 0;
+ margin-bottom: 4em;
+ }
+
+ h1, h2 {
+ font-family: inherit;
+ font-weight: bold;
+ }
+}
+
+.unresponsive-council__header,
+.unresponsive-council__body {
+ padding: 1.5em;
+ font-size: 1.3em;
+}
+
+.unresponsive-council__header {
+ background-color: $primary;
+
+ border-bottom: none;
+ margin-bottom: 0;
+
+ h1 {
+ font-size: 2.5em;
+ line-height: 1em;
+ margin-bottom: 0.2em;
+ }
+}
+
+.unresponsive-council__body {
+ p {
+ max-width: 26em;
+ }
+}
+
+.unresponsive-council-cta {
+ margin: 1.5em 0;
+ max-width: 20em;
+ padding-right: 6em;
+ background-image: url(images/unresponsive-council-cta-arrow.png);
+ background-position: right center;
+ background-repeat: no-repeat;
+
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
+ background-image: url(images/unresponsive-council-cta-arrow@2.png);
+ background-size: 60px;
+ }
+} \ No newline at end of file
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index a9ffe7295..98e032598 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -163,15 +163,18 @@ select {
width: 100%;
}
-// links
-a,
-a:visited {
- text-decoration:none;
- color:#0BA7D1;
+a {
+ text-decoration: none;
+ color: #0BA7D1;
+
+ &:visited {
+ color: #0BA7D1;
+ }
+
&:hover,
&:active {
- text-decoration:underline;
- color:#0D7CCE;
+ text-decoration: underline;
+ color: #0D7CCE;
}
}
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index a0ab4f34c..7b7bee7e8 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -9,8 +9,8 @@ function fixmystreet_update_pin(lonlat) {
document.getElementById('fixmystreet.longitude').value = lonlat.lon || lonlat.x;
$.getJSON('/report/new/ajax', {
- latitude: $('#fixmystreet\\.latitude').val(),
- longitude: $('#fixmystreet\\.longitude').val()
+ latitude: $('#fixmystreet\\.latitude').val(),
+ longitude: $('#fixmystreet\\.longitude').val()
}, function(data) {
if (data.error) {
if (!$('#side-form-error').length) {
@@ -29,6 +29,7 @@ function fixmystreet_update_pin(lonlat) {
if ( lb.length === 0 ) { lb = $('#form_name').prev(); }
lb.before(data.extra_name_info);
}
+
// If the category filter appears on the map and the user has selected
// something from it, then pre-fill the category field in the report,
// if it's a value already present in the drop-down.
@@ -36,6 +37,11 @@ function fixmystreet_update_pin(lonlat) {
if (category !== undefined && $("#form_category option[value="+category+"]").length) {
$("#form_category").val(category);
}
+
+ var category_select = $("select#form_category");
+ if (category_select.val() != '-- Pick a category --') {
+ category_select.change();
+ }
});
if (!$('#side-form-error').is(':visible')) {