// Factory function for team objects. As much as possible, this uses
// only member variables (prefixed "m_") and inner functions with
-// private scope. Some functions are visible as member-functions to be
-// called from outside code -- specifically, from generated
-// HTML. These functions are that.switchView(), showDetails(),
-// limitTarget(), limitQuery(), delimitTarget(), delimitQuery(),
-// showPage(), pagerPrev(), pagerNext().
+// private scope.
+//
+// Some functions are visible as member-functions to be called from
+// outside code -- specifically, from generated HTML. These functions
+// are that.switchView(), showDetails(), limitTarget(), limitQuery(),
+// delimitTarget(), delimitQuery(), showPage(), pagerPrev(),
+// pagerNext().
//
function team($, teamName) {
var that = {};
var m_paz; // will be initialised below
var m_template = {};
+
+ // Accessor methods for individual widgets: readers
that.name = function() { return m_teamName; }
that.submitted = function() { return m_submitted; }
that.perpage = function() { return m_perpage; }
that.currentRecordData = function() { return m_currentRecordData; }
that.filters = function() { return m_filters; }
+ // Accessor methods for individual widgets: writers
that.set_sortOrder = function(val) { m_sortOrder = val };
that.set_perpage = function(val) { m_perpage = val };
- var log = function (s) {
+ function log(s) {
var now = $.now();
var timestamp = ((now - m_logTime.start)/1000).toFixed(3) + " (+" + ((now - m_logTime.last)/1000).toFixed(3) + ") "
m_logTime.last = now;
}
-
that.showPage = function (pageNum)
{
m_currentPage = pageNum;