gitlab-org--gitlab-foss/app/assets/javascripts/flash.js.coffee
Dmitriy Zaporozhets 20d6f96928
Improve flash messages
* dont fadeout so user can read
* show inside content block so user can notice it

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 18:00:21 +03:00

14 lines
268 B
CoffeeScript

class Flash
constructor: (message, type)->
flash = $(".flash-container")
flash.html("")
$('<div/>',
class: "flash-#{type}",
text: message
).appendTo(".flash-container")
flash.click -> $(@).fadeOut()
flash.show()
@Flash = Flash