mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-06-12 12:39:20 +08:00
19 lines
333 B
CoffeeScript
19 lines
333 B
CoffeeScript
$ ->
|
|
window.ErrorHandle =
|
|
addError: (error) ->
|
|
$('#page-alert').append "<p>#{error}</p>"
|
|
|
|
clearError: ->
|
|
$('#page-alert').find('button').nextAll().remove()
|
|
|
|
showError: ->
|
|
$('#page-alert').show()
|
|
|
|
hideError: ->
|
|
$('#page-alert').hide()
|
|
|
|
flushError: (error) ->
|
|
@clearError()
|
|
@addError error
|
|
@showError()
|