From: Mike Taylor Date: Wed, 29 Jan 2014 13:57:41 +0000 (+0000) Subject: Popup records now work for all result-lists, as the request is now X-Git-Tag: 1.0.0~1573 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=5c8af699d6eb45391f7d2aa9b344f710e8dd4db5 Popup records now work for all result-lists, as the request is now sent to the correct m_paz. Fixes bug MKWS-106. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index b5dc51d..98fc11c 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -230,6 +230,7 @@ function _make_mkws_team($, teamName) { "usesessions" : mkws_config.use_service_proxy ? false : true, "showResponseType": '', // or "json" (for debugging?) "onrecord": my_onrecord }); + that.m_paz = m_paz; // For access from non-member functions like mkws.showDetails if (!isNaN(parseInt(mkws_config.perpage_default))) { m_recPerPage = parseInt(mkws_config.perpage_default); @@ -281,7 +282,7 @@ function _make_mkws_team($, teamName) { { var template = loadTemplate("Summary"); hit._id = "mkwsRec_" + hit.recid; - hit._onclick = "mkws.showDetails(this.id);return false;" + hit._onclick = "mkws.showDetails(this.id, '" + m_teamName + "');return false;" return template(hit); } @@ -729,7 +730,7 @@ function _make_mkws_team($, teamName) { // detailed record drawing - mkws.showDetails = function (prefixRecId) { + mkws.showDetails = function (prefixRecId, tname) { var recId = prefixRecId.replace('mkwsRec_', ''); var oldRecId = m_curDetRecId; m_curDetRecId = recId; @@ -747,7 +748,9 @@ function _make_mkws_team($, teamName) { return; } // request the record - m_paz.record(recId); + var team = mkws.teams[tname]; + if (!team) alert("no team '" + tname + "'"); + team.m_paz.record(recId); }