2014-10-20 20:48:07 +00:00
|
|
|
class @Flash
|
2013-08-27 09:18:53 +00:00
|
|
|
constructor: (message, type)->
|
|
|
|
flash = $(".flash-container")
|
|
|
|
flash.html("")
|
|
|
|
|
|
|
|
$('<div/>',
|
|
|
|
class: "flash-#{type}",
|
|
|
|
text: message
|
|
|
|
).appendTo(".flash-container")
|
|
|
|
|
|
|
|
flash.click -> $(@).fadeOut()
|
|
|
|
flash.show()
|