aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/web/fixmystreet/reports/council.html29
-rw-r--r--web/cobrands/fixmystreet/base.scss6
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js17
3 files changed, 40 insertions, 12 deletions
diff --git a/templates/web/fixmystreet/reports/council.html b/templates/web/fixmystreet/reports/council.html
index 7af9201cd..092b2588b 100755
--- a/templates/web/fixmystreet/reports/council.html
+++ b/templates/web/fixmystreet/reports/council.html
@@ -75,8 +75,25 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
</p>
[% END %]
- [% INCLUDE 'pagination.html', param = 'p' %]
+[% IF children.size %]
+
+<a href="#council_wards" class="button-right hidden-nojs hideshow-trigger">[% loc('Wards of this council') %]</a>
+
+<section id="council_wards" class="hidden-js">
+ <h2>[% loc('Wards of this council') %]</h2>
+ <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
+ <ul class="list-a full-width">
+ [% FOR child IN children.values.sort('name') %]
+ <li><a href="[% child.url %]">[% child.name %]</a></li>
+ [% END %]
+ </ul>
+</section>
+[% END %]
+
+
+
+[% INCLUDE 'pagination.html', param = 'p' %]
[% INCLUDE column
title = loc('Recently fixed')
problems = fixed.${council.id}.new
@@ -111,16 +128,6 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
%]
-[% IF children.size %]
-<h2>[% loc('Wards of this council') %]</h2>
-<p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
-<ul>
- [% FOR child IN children.values.sort('name') %]
- <li><a href="[% child.url %]">[% child.name %]</a></li>
- [% END %]
-</ul>
-[% END %]
-
</div>
[% INCLUDE 'footer.html' %]
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index e846cfe1b..6b0c1850a 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -1034,6 +1034,12 @@ table.nicetable {
visibility: hidden;
}
+// hide anything with this class if js is NOT working
+.no-js .hidden-nojs {
+ display: none !important;
+ visibility: hidden;
+}
+
/* Front page */
#front-main {
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 490f7f134..a6ae9be21 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -92,7 +92,7 @@ $(function(){
}).data('size', 'full');
}
}
-
+
//heightfix the desktop .content div
if(Modernizr.mq('only screen and (min-width:48em)')) {
if (!($('body').hasClass('frontpage'))){
@@ -300,4 +300,19 @@ $(function(){
$('.form-focus-trigger').on('focus', function(){
$('.form-focus-hidden').fadeIn(500);
});
+
+ /*
+ * Show on click - pretty generic
+ */
+ $('.hideshow-trigger').on('click', function(e){
+ e.preventDefault();
+ var href = $(this).attr('href'),
+ //stupid IE sometimes adds the full uri into the href attr, so trim
+ start = href.indexOf('#'),
+ target = href.slice(start, href.length);
+
+ $(target).removeClass('hidden-js');
+
+ $(this).hide();
+ });
});