mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-15 04:48:59 +08:00
19 lines
307 B
CoffeeScript
19 lines
307 B
CoffeeScript
$ ->
|
|
window.ErrorHandle =
|
|
addError: (error) ->
|
|
$('#page-alert').append "<p>#{error}</p>"
|
|
|
|
clearError: ->
|
|
$('#page-alert').empty()
|
|
|
|
showError: ->
|
|
$('#page-alert').show()
|
|
|
|
hideError: ->
|
|
$('#page-alert').hide()
|
|
|
|
flushError: (error) ->
|
|
@clearError()
|
|
@addError error
|
|
@showError()
|