Mercurial > summit-idp
changeset 31:b92bb0974500
Added comments.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Sat, 26 Jun 2010 09:10:10 -0700 |
parents | f56852d2076f |
children | 0429f7860b30 |
files | static-files/index.js |
diffstat | 1 files changed, 30 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/static-files/index.js Sat Jun 26 09:00:46 2010 -0700 +++ b/static-files/index.js Sat Jun 26 09:10:10 2010 -0700 @@ -1,5 +1,11 @@ +// ----------------------------------------------------------------------- +// Config object +// ----------------------------------------------------------------------- +// +// This manages interactions with client-side persistent storage and the +// current login state of the app. + ( - // Config initialization code. function(window) { var Config = window.Config = { get value() { @@ -39,8 +45,13 @@ } )(window); +// ----------------------------------------------------------------------- +// Attendees object +// ----------------------------------------------------------------------- +// +// This manages the list of Summit attendees and their shared metadata. + ( - // Attendee initialization code. function(window) { var req; @@ -102,9 +113,16 @@ return jQuery.ajax(options); }; +// ----------------------------------------------------------------------- +// UserInterface object +// ----------------------------------------------------------------------- +// +// This manages the user interface logic. + ( - // This anonymous closure sets up the UI. function(window) { + var UserInterface = window.UserInterface = {}; + function updateUI() { $(".screen").hide(); $("#" + Config.value.state).show(); @@ -230,9 +248,17 @@ } )(window); +// ----------------------------------------------------------------------- +// Server object +// ----------------------------------------------------------------------- +// +// This sets up an in-browser "server" that can be accessed from other +// windows via a postMessage API. + ( - // Set up the postMessage API. function(window) { + var Server = window.Server = {}; + var attendeeCallbacks = []; var myOrigin = window.location.protocol + "//" + window.location.host;