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
11 years ago
|
class app.views.Notice extends app.View
|
||
|
@className: '_notice'
|
||
9 years ago
|
@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...)
|
||
8 years ago
|
@prependTo app.el
|
||
11 years ago
|
return
|
||
|
|
||
|
hide: ->
|
||
|
$.remove @el
|
||
|
return
|