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