diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/_base.scss | 7 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/_layout.scss | 5 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 42 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/images/share.png | bin | 0 -> 435 bytes |
4 files changed, 39 insertions, 15 deletions
diff --git a/web/cobrands/fixmystreet/_base.scss b/web/cobrands/fixmystreet/_base.scss index c5c7854a8..900f4010e 100644 --- a/web/cobrands/fixmystreet/_base.scss +++ b/web/cobrands/fixmystreet/_base.scss @@ -585,6 +585,10 @@ p.label-valid { background-image:url('/cobrands/fixmystreet/images/sprite.png'); background-position:center -2563px; } + &.share { + background-image: url('/cobrands/fixmystreet/images/share.png'); + background-position: center 25%; + } &.chevron { background-image:url('/cobrands/fixmystreet/images/sprite.png'); background-position:center -2716px; @@ -631,6 +635,9 @@ p.label-valid { } } +#report-share iframe { + vertical-align: top; +} //footer blocks #footer-mobileapps { diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss index 0973e645d..d2e47d76c 100644 --- a/web/cobrands/fixmystreet/_layout.scss +++ b/web/cobrands/fixmystreet/_layout.scss @@ -589,6 +589,11 @@ body.twothirdswidthpage { background-image:url(/cobrands/fixmystreet/images/sprite.png); background-position:right -3074px; } + &.share { + min-width: 5em; + background-image: url(/cobrands/fixmystreet/images/share.png); + background-position: 90% 50%; + } &.chevron { background-image:url(/cobrands/fixmystreet/images/sprite.png); background-position:right -3225px; diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 21f13d47c..714699386 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -246,23 +246,34 @@ $(function(){ // A sliding drawer from the bottom of the page, small version // that doesn't change the main content at all. -$.fn.small_drawer = function(id) { - this.toggle(function(){ - var $this = $(this), d = $('#' + id); - if (!$this.addClass('hover').data('setup')) { - d.hide().removeClass('hidden-js').css({ +(function($){ + + var opened; + + $.fn.small_drawer = function(id) { + this.toggle(function(){ + if (opened) { + opened.click(); + } + var $this = $(this), d = $('#' + id); + if (!$this.addClass('hover').data('setup')) { + d.hide().removeClass('hidden-js').css({ padding: '1em', background: '#fff' - }); - $this.data('setup', true); - } - d.slideDown(); - }, function(e){ - var $this = $(this), d = $('#' + id); - $this.removeClass('hover'); - d.slideUp(); - }); -}; + }); + $this.data('setup', true); + } + d.slideDown(); + opened = $this; + }, function(e){ + var $this = $(this), d = $('#' + id); + $this.removeClass('hover'); + d.slideUp(); + opened = null; + }); + }; + +})(jQuery); // A sliding drawer from the bottom of the page, large version $.fn.drawer = function(id, ajax) { @@ -337,6 +348,7 @@ $.fn.drawer = function(id, ajax) { $('#key-tool-around-updates').drawer('updates_ajax', true); } $('#key-tool-report-updates').small_drawer('report-updates-data'); + $('#key-tool-report-share').small_drawer('report-share'); // Go directly to RSS feed if RSS button clicked on alert page // (due to not wanting around form to submit, though good thing anyway) diff --git a/web/cobrands/fixmystreet/images/share.png b/web/cobrands/fixmystreet/images/share.png Binary files differnew file mode 100644 index 000000000..6eb1b6cdb --- /dev/null +++ b/web/cobrands/fixmystreet/images/share.png |