Created
October 24, 2009 19:19
-
-
Save rmurphey/217702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dojo.provide('hitpost.layer'); | |
dojo.require('plugd.trigger'); | |
dojo.require('hitpost.Messaging'); | |
dojo.require('hitpost.Forms'); | |
dojo.require('hitpost.Search'); | |
dojo.require('hitpost.ActivityMonitor'); | |
dojo.require('hitpost.Auth'); | |
dojo.require('hitpost.Home'); | |
dojo.require('hitpost.PreGame'); | |
dojo.require('hitpost.LiveGame'); | |
dojo.require('hitpost.PostGame'); | |
dojo.require('hitpost.PostRegistration'); | |
dojo.declare('hitpost._base', null, { | |
constructor : function() { | |
this._tasks = { | |
'home' : function() { | |
new hitpost.Home(); | |
}, | |
'state_live' : function() { | |
new hitpost.LiveGame(); | |
}, | |
'state_post' : function() { | |
new hitpost.PostGame(); | |
}, | |
'registered' : function() { | |
new hitpost.PostRegistration(); | |
}, | |
'state_pre' : function() { | |
new hitpost.PreGame(); | |
}, | |
'state_pre15' : function() { | |
new hitpost.PreGame(); | |
} | |
}; | |
dojo.addOnLoad(dojo.hitch(this, '_init')); | |
}, | |
_init : function() { | |
hitpost.ActivityMonitor = new hitpost.ActivityMonitor(); | |
hitpost.Messaging = new hitpost.Messaging(); | |
hitpost.Search = new hitpost.Search(); | |
hitpost.Auth = new hitpost.Auth(); | |
hitpost.Forms = new hitpost.Forms(); | |
dojo.forEach( | |
dojo.body().className.split(' '), | |
function(c) { this._tasks[c] && this._tasks[c](); }, | |
this | |
); | |
} | |
}); | |
dojo.addOnLoad(function() { | |
new hitpost._base(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment