Class Index | File Index

Classes


Namespace ui

Anything that directly updates the UI.
Defined in: <js/ui.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
ui
Method Summary
Method Attributes Method Name and Description
<static>  
ui.realtimeUpdate(updateEvent, cb)
Smartly update the currently loaded view, based on the current game state.
<static>  
ui.update(data, cb)
Replaces the displayed view.
Namespace Detail
ui
Method Detail
<static> ui.realtimeUpdate(updateEvent, cb)
Smartly update the currently loaded view, based on the current game state.
Parameters:
{string=} updateEvent
Optional string containing information about what caused this update, e.g. "gameSim" or "newPhase".
{function()=} cb
Optional callback that will run after the page updates.

<static> ui.update(data, cb)
Replaces the displayed view. This updates the content of the page (either #content if data.inLeague is false or #league_content otherwise), sets the title (and appends the league number to it when appropriate), and injects g.lid as lid to the template.
Parameters:
{Object} data
An object with several properties: "title" the title of the page; "vars" the variables to be passed to the handlebars template; "template" the name of the handlebars template; "isLeague" a boolean saying whether this is within a league or not.
{function()=} cb
Optional callback

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 10 2013 23:08:32 GMT-0400 (EDT)