From: Mike Taylor Date: Mon, 24 Mar 2014 17:39:12 +0000 (+0000) Subject: mkwsDet elements now also move the team to a CSS class. X-Git-Tag: 1.0.0~1272 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=380185d8810a5ae4b18cd3695b70d7de0f729ec1 mkwsDet elements now also move the team to a CSS class. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 02b0b55..ed64173 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -538,7 +538,8 @@ function team($, teamName) { // FIXME: record is async!! clearTimeout(m_paz.recordTimer); // in case on_show was faster to redraw element - var detRecordDiv = document.getElementById('mkwsDet_' + teamName + '_' + data.recid); + // ##### restrict to current team + var detRecordDiv = document.getElementById('mkwsDet_' + data.recid); if (detRecordDiv) return; m_currentRecordData = data; var recordDiv = findnode(recordElementId(m_currentRecordData.recid[0])); @@ -783,7 +784,8 @@ function team($, teamName) { m_currentRecordId = recId; // remove current detailed view if any - var detRecordDiv = document.getElementById('mkwsDet_' + m_teamName + '_' + oldRecordId); + // ##### restrict to current team + var detRecordDiv = document.getElementById('mkwsDet_' + oldRecordId); // lovin DOM! if (detRecordDiv) detRecordDiv.parentNode.removeChild(detRecordDiv); @@ -1057,7 +1059,7 @@ function team($, teamName) { { var template = loadTemplate("Record"); var details = template(data); - return '
' + details + '
'; + return '
' + details + '
'; } that.renderDetails = renderDetails;