X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=809c0553a7e46623773b8aa78b83711df50855a5;hb=2af65f280ec21a47b95a78c92b01d74a1867c03a;hp=23b76d1c1858e649b6174082e231d19696bc096b;hpb=2f0b4a9e090d7825711eb5937077c1105a581bf0;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 23b76d1..809c055 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -66,13 +66,6 @@ Handlebars.registerHelper('commaList', function(items, options) { -// Some functions are visible to be called from outside code, namely -// generated HTML: that.switchView(), showDetails(), limitTarget(), -// limitQuery(), delimitTarget(), delimitQuery(), pagerPrev(), -// pagerNext(), showPage(). Also mkws.M() is made available for the -// Handlebars helper 'translate' - - // Set up global mkws object. Contains a hash of team objects, // indexed by windowid. var mkws = { @@ -149,7 +142,15 @@ if (mkws_config == null || typeof mkws_config != 'object') { } -// wrapper for jQuery lib +// 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 visibl as member-functions to be +// called from outside code -- specifically, from generated +// HTML. These functions are that.switchView(), showDetails(), +// limitTarget(), limitQuery(), delimitTarget(), delimitQuery(), +// pagerPrev(), pagerNext(), showPage(). Also mkws.M() is made +// available for the Handlebars helper 'translate' +// function team($, teamName) { var that = {}; var m_teamName = teamName; @@ -452,7 +453,7 @@ function team($, teamName) { m_filters = [] redraw_navi(); - resetPage(); // ### the globals it resents should be indexed by windowid + resetPage(); loadSelect(); triggerSearch(query, sort, targets, windowid); that.switchView('records'); // In case it's configured to start off as hidden