X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=54a73a61d39d11c50123da32d0c6c9c666101672;hb=24209a0a9c198492db94011f1cf7862ff80937f2;hp=dc22fd7aa5fd45c10981b0bca7d90a41a6a273aa;hpb=6e579300f4683bf1238100608c716cec57f7c756;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index dc22fd7..54a73a6 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -28,6 +28,7 @@ function team($, teamName) { var m_paz; // will be initialised below var m_template = {}; + that.toString = function() { return '[Team ' + teamName + ']'; } // Accessor methods for individual widgets: readers that.name = function() { return m_teamName; } @@ -121,7 +122,7 @@ function team($, teamName) { } - // Used by promoteRecords() and onRecord() + // Used by the Records widget and onRecord() function recordElementId(s) { return 'mkwsRec_' + s.replace(/[^a-z0-9]/ig, '_'); } @@ -131,7 +132,6 @@ function team($, teamName) { function recordDetailsId(s) { return 'mkwsDet_' + s.replace(/[^a-z0-9]/ig, '_'); } - that.recordElementId = recordElementId; that.targetFiltered = function(id) { @@ -145,7 +145,7 @@ function team($, teamName) { } - that.limitTarget = function (id, name) + that.limitTarget = function(id, name) { log("limitTarget(id=" + id + ", name=" + name + ")"); m_filters.push({ id: id, name: name }); @@ -154,7 +154,7 @@ function team($, teamName) { } - that.limitQuery = function (field, value) + that.limitQuery = function(field, value) { log("limitQuery(field=" + field + ", value=" + value + ")"); m_filters.push({ field: field, value: value }); @@ -163,7 +163,7 @@ function team($, teamName) { } - that.delimitTarget = function (id) + that.delimitTarget = function(id) { log("delimitTarget(id=" + id + ")"); var newFilters = []; @@ -183,7 +183,7 @@ function team($, teamName) { } - that.delimitQuery = function (field, value) + that.delimitQuery = function(field, value) { log("delimitQuery(field=" + field + ", value=" + value + ")"); var newFilters = []; @@ -205,14 +205,14 @@ function team($, teamName) { } - that.showPage = function (pageNum) + that.showPage = function(pageNum) { m_currentPage = pageNum; m_paz.showPage(m_currentPage - 1); } - that.pagerNext = function () { + that.pagerNext = function() { if (m_totalRecordCount - m_perpage*m_currentPage > 0) { m_paz.showNext(); m_currentPage++; @@ -220,7 +220,7 @@ function team($, teamName) { } - that.pagerPrev = function () { + that.pagerPrev = function() { if (m_paz.showPrev() != false) m_currentPage--; } @@ -255,7 +255,7 @@ function team($, teamName) { } - function triggerSearch (query, sortOrder, targets) + function triggerSearch(query, sortOrder, targets) { resetPage(); queue("navi").publish(); @@ -340,7 +340,7 @@ function team($, teamName) { // detailed record drawing - that.showDetails = function (recId) { + that.showDetails = function(recId) { var oldRecordId = m_currentRecordId; m_currentRecordId = recId; @@ -624,7 +624,9 @@ function team($, teamName) { return s + '.mkwsTeam_' + teamName; }).join(','); - return $(selector); + var node = $(selector); + //log('findnode(' + selector + ') found ' + node.length + ' nodes'); + return node; }