Commit d1211e0a authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix award-emojis alert flash message

This adds a new feature to `Flash` that allows to pin it after a
specified selector. This removes a fixed position from such award-emoji
alert, and makes it responsive by design of selector that this alert is
pinned to.

Closes #3996
parent 2029be03
......@@ -12,5 +12,5 @@ class @Flash
@flash.click -> $(@).fadeOut()
@flash.show()
pin: ->
@flash.addClass('flash-pinned flash-raised')
pinTo: (selector) ->
@flash.detach().appendTo(selector)
......@@ -114,7 +114,7 @@ class @Notes
unless note.valid
if note.award
flash = new Flash('You have already used this award emoji!', 'alert')
flash.pin()
flash.pinTo('.header-content')
return
# render note if it not present in loaded list
......
......@@ -15,13 +15,3 @@
@extend .alert-danger;
}
}
.flash-pinned {
position: fixed;
top: 80px;
width: 80%;
}
.flash-raised {
z-index: 1000;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment