Files
RootPanel/core/static/script/base/ErrorHandle.coffee
2014-04-18 11:15:53 +08:00

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()