debian-mirror-gitlab/app/assets/javascripts/flash.js.coffee
2015-04-26 09:18:37 +02:00

12 lines
253 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()