mirror of https://github.com/freeCodeCamp/devdocs
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.
28 lines
406 B
28 lines
406 B
class app.views.Notice extends app.View
|
|
@className: '_notice'
|
|
@attributes:
|
|
role: 'alert'
|
|
|
|
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.el
|
|
return
|
|
|
|
hide: ->
|
|
$.remove @el
|
|
return
|