Class: Dashboard

Dashboard

new Dashboard()

Dashboard displaying miscellaneous real-time information

Dashboards display information about the bulletin board you're on. Currently supported: 'thread', 'forum', 'mod_queue' and 'newbies'. Most configuration is done through the HTML in the "container" parameter. Elements with class "dashboard-header" have the dashboard header inserted. Elements with class "dashboard-section" are set to dashboard sections (based on their "data-monitor" parameter) Elements with class "dashboard-body" within "dashboard-section" receive the contents of the section Elements with class "dashboard-refresh" will trigger a refresh of the current section when clicked Elements with class "dashboard-done" are treated as buttons to (un)mark a section done Section elements have classes "loading", "empty", "nonempty", "done" and "undone" set as appropriate. Section elements can have a 'bb' data item if they need to access a different bulletin board
Example
var dashboard = new Dashboard({
    cache             : { ... }, // values previously passed to cache, or an empty object on first run
    cache_updater     : function(cache) { ... }, // save object to pass in next time
    container         : $(...), // element containing dashboard content
    interval          : 60000   // each monitor will be polled once per this many milliseconds
});

Extends

Methods

inherited abstractrefresh(args){jQuery.Promise}

Reload the cached values
Name Type Description
args Object cacheable arguments (as passed to Cacheable())
Returns:
Type Description
jQuery.Promise promise that will return when the cache has been refreshed
Update this.cache using the passed cache_updater() callback