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.
29 lines
457 B
29 lines
457 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: ->
|
|
@addClass '_top' if @type is 'disabledDoc'
|
|
@html @tmpl("#{@type}Notice", @args...)
|
|
@prependTo $('._app')
|
|
return
|
|
|
|
hide: ->
|
|
$.remove @el
|
|
return
|