mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-03 15:16:50 +08:00
22 lines
428 B
CoffeeScript
22 lines
428 B
CoffeeScript
$ ->
|
|
window.ErrorHandle =
|
|
addInfo: (type, info) ->
|
|
$("#page-#{type}").append "<p>#{info}</p>"
|
|
|
|
clearInfo: (type) ->
|
|
$("#page-#{type}").empty()
|
|
|
|
showInfo: (type, callback) ->
|
|
$("#page-#{type}").show 400, if callback? then callback or null
|
|
|
|
|
|
hideInfo: (type) ->
|
|
$("#page-#{type}").hide()
|
|
|
|
flushInfo: (type, error, callback = null) ->
|
|
@clearInfo type
|
|
@addInfo type, error
|
|
@showInfo type, callback
|
|
|
|
|