1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 10:18:21 +01:00
antd-web-apps/apps/assets/coffee/APIManager.coffee
Xuan Sang LE 0817dd6079 apps
2018-08-28 14:49:03 +02:00

22 lines
668 B
CoffeeScript

class APIManager extends window.classes.BaseObject
constructor: () ->
super "APIManager"
init: (cname) ->
console.log(cname)
@ready()
.then () ->
if mobilecheck()
mobileConsole.init()
# load the class
return if not cname or cname is ""
return console.error("Cannot find class ", cname) unless window.classes[cname]
(new window.classes[cname]).init()
.catch ( m, s ) ->
console.error(m, s)
APIManager.dependencies = [
"/assets/scripts/mobile_console.js"
]
makeclass "APIManager", APIManager