gitlab-org--gitlab-foss/app/assets/javascripts/flash.js.coffee

13 lines
253 B
CoffeeScript
Raw Normal View History

2014-10-20 16:48:07 -04:00
class @Flash
constructor: (message, type)->
flash = $(".flash-container")
flash.html("")
$('<div/>',
class: "flash-#{type}",
text: message
).appendTo(".flash-container")
flash.click -> $(@).fadeOut()
flash.show()