diff options
-rwxr-xr-x | templates/web/fixmystreet/reports/council.html | 2 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/base.scss | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 27 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/images/sprite.png | bin | 140420 -> 124999 bytes | |||
-rw-r--r-- | web/cobrands/fixmystreet/layout.scss | 6 |
5 files changed, 19 insertions, 20 deletions
diff --git a/templates/web/fixmystreet/reports/council.html b/templates/web/fixmystreet/reports/council.html index 707ecabc8..3de6f81eb 100755 --- a/templates/web/fixmystreet/reports/council.html +++ b/templates/web/fixmystreet/reports/council.html @@ -80,7 +80,7 @@ <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="issue-list-a"> + <ul class="issue-list-a full-width"> [% FOR child IN children.values.sort('name') %] <li><a href="[% child.url %]"><span class="text">[% child.name %]</span></a></li> [% END %] diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss index 967d7422f..f95a4a7e9 100644 --- a/web/cobrands/fixmystreet/base.scss +++ b/web/cobrands/fixmystreet/base.scss @@ -597,6 +597,10 @@ p.label-valid { background-image:url('images/sprite.png'); background-position:center -2716px; } + &.hover { + background-image:url('images/sprite.png'); + background-position:center -2064px; + } } } } diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index ba9e8c2d2..f50b66fd0 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -377,33 +377,24 @@ $.fn.drawer = function(id, ajax) { if (!d.length) { d = $('<div id="' + id + '">'); } - // Put the padding on an inner div to prevent the jarring jump at end of hide/show animation - var innerDiv = $('<div>').css({ padding: '1em' }); - d.wrapInner(innerDiv); - var max_height = $(window).height() - $('.content').offset().top - $('.shadow-wrap').height(); - var height = d.height(); - if (!height || height > max_height) { - height = max_height; - } - d.css({ - backgroundColor: 'white', - height: height, - display: 'none', zIndex: 1001, position: 'relative', - overflow: 'auto' - }).removeClass('hidden-js'); + d.removeClass('hidden-js'); if (ajax) { var href = $this.attr('href') + ';ajax=1'; - innerDiv.load(href); + d.load(href); } d.find('h2').css({ marginTop: 0 }); - $('.shadow-wrap').append(d); + $('.content').append(d); + d_offset = d.offset().top; + d.hide(); $this.data('setup', true); } - d.animate( { height: 'show' } ); + d.animate({height:'show'},1000); + $('html, body').animate({scrollTop:d_offset-80}, 1000); + }, function(e){ var $this = $(this), d = $('#' + id); $this.removeClass('hover'); - d.animate( { height: 'hide' } ); + d.animate({height:'hide'}); }); }; diff --git a/web/cobrands/fixmystreet/images/sprite.png b/web/cobrands/fixmystreet/images/sprite.png Binary files differindex a03ae56c2..c2ac370ab 100644 --- a/web/cobrands/fixmystreet/images/sprite.png +++ b/web/cobrands/fixmystreet/images/sprite.png diff --git a/web/cobrands/fixmystreet/layout.scss b/web/cobrands/fixmystreet/layout.scss index 91c32c6af..d6f4bdbaa 100644 --- a/web/cobrands/fixmystreet/layout.scss +++ b/web/cobrands/fixmystreet/layout.scss @@ -598,7 +598,7 @@ body.twothirdswidthpage { a { font-size: 0.75em; color:#888888; - padding: 0.5em 1em 0.5em 0; + padding: 0.5em 1.5em 0.5em 0; text-transform:none; &.abuse { background-image:url(images/sprite.png); @@ -612,6 +612,10 @@ body.twothirdswidthpage { background-image:url(images/sprite.png); background-position:right -3225px; } + &.hover { + background-image:url(images/sprite.png); + background-position:right -1876px; + } } } &.singleton { |