Skip to content

Instantly share code, notes, and snippets.

@rmurphey
Created October 24, 2009 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmurphey/217702 to your computer and use it in GitHub Desktop.
Save rmurphey/217702 to your computer and use it in GitHub Desktop.
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