d795a56c93
User authentication now through /auth (GET|POST). /chat removed. Increased the time limit for a user to be logged out from 1sec to 5secs (the pages take a bit longer to load now).
35 lines
715 B
CoffeeScript
35 lines
715 B
CoffeeScript
define [
|
|
'jquery',
|
|
'underscore',
|
|
'backbone',
|
|
'raphael',
|
|
'globals',
|
|
'cs!router',
|
|
'cs!models/connection',
|
|
'jquery.mousewheel',
|
|
'jquery.autosize',
|
|
'jquery.form',
|
|
'jquery.ui'
|
|
], ($, _, Backbone, Raphael, globals, Router, ConnectionModel) ->
|
|
|
|
globals.router = {}
|
|
globals.connection = {}
|
|
|
|
initialize = ->
|
|
# Authentication object, set when the user is authorized in
|
|
globals.currentAuth = null
|
|
|
|
# Default application router
|
|
globals.router = new Router()
|
|
|
|
# Default connection (websocket)
|
|
globals.connection = new ConnectionModel()
|
|
|
|
# Start at /login
|
|
globals.router.showLogin()
|
|
Backbone.history.start({silent: true})
|
|
|
|
return {
|
|
initialize: initialize
|
|
}
|