You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/assets/javascripts/views/misc/notice.coffee

28 lines
410 B

11 years ago
class app.views.Notice extends app.View
@className: '_notice'
@attributes:
role: 'alert'
11 years ago
constructor: (@type, @args...) -> super
init: ->
@activate()
return
activate: ->
@show() if super
return
deactivate: ->
@hide() if super
return
show: ->
@html @tmpl("#{@type}Notice", @args...)
@prependTo $('._app')
return
hide: ->
$.remove @el
return