aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/cobrands/fixmystreet/base.scss16
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js20
-rw-r--r--web/cobrands/fixmystreet/images/sprite.pngbin138744 -> 140420 bytes
3 files changed, 36 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index 57b3dc863..5959eb99a 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -1299,6 +1299,22 @@ table.nicetable {
background:$primary;
padding:1em;
margin-bottom:1em;
+ overflow:hidden;
+ position: relative;
+ .close-promo {
+ position:absolute;
+ top:0.5em;
+ right:0.5em;
+ display:block;
+ width:16px;
+ height:16px;
+ text-indent:-999999px;
+ background:url(images/sprite.png) -341px -263px no-repeat;
+ @include border-radius(4px);
+ &:hover {
+ background:#222 url(images/sprite.png) -341px -223px no-repeat;
+ }
+ }
}
.alert {
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index af178698c..ba9e8c2d2 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -449,6 +449,26 @@ $.fn.drawer = function(id, ajax) {
$('#sub_map_links').animate({'right':-maplinks_width}, 1200);
}
});
+
+
+ /*
+ * Add close buttons for .promo's
+ */
+ if($('.promo').length){
+ $('.promo').append('<a href="#" class="close-promo">x</a>');
+ }
+ //only close its own parent
+ $('.promo').on('click', '.close-promo', function(e){
+ e.preventDefault();
+ $(this).parent('.promo').animate({
+ 'height':0,
+ 'padding-top':0,
+ 'padding-bottom':0
+ },{
+ duration:500,
+ queue:false
+ }).fadeOut(500);
+ });
});
/*
diff --git a/web/cobrands/fixmystreet/images/sprite.png b/web/cobrands/fixmystreet/images/sprite.png
index d0839890a..a03ae56c2 100644
--- a/web/cobrands/fixmystreet/images/sprite.png
+++ b/web/cobrands/fixmystreet/images/sprite.png
Binary files differ